Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 03-13-2018, 09:40 PM   #1531
MarjaE
Addict
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 345
Karma: 1548692
Join Date: Jun 2015
Device: Iriver Story HD and Amazon Kindle DX
Sorry.
Attached Files
File Type: pdf cyrillic2 - Converted.pdf (3.54 MB, 18 views)
MarjaE is offline   Reply With Quote
Advert
Old 03-17-2018, 03:49 PM   #1532
xilopaint
Junior Member
xilopaint began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2018
Device: none
Hello willus!

I have been trying to follow the instructions to build k2pdfopt in macOS, but I'm getting these errors:

Quote:
$ gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.cg
clang: error: no such file or directory: 'k2pdfopt.cg'
clang: error: no input files
My intention is trying to build a lightweight version of k2pdfopt for my Alfred workflow. I need only four command line options: "-as", "-mode copy", "-dpi" and "-o".

Last edited by xilopaint; 03-17-2018 at 03:52 PM.
xilopaint is offline   Reply With Quote
Old 03-18-2018, 02:25 PM   #1533
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 973
Karma: 7562459
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by xilopaint View Post
Hello willus!

I have been trying to follow the instructions to build k2pdfopt in macOS, but I'm getting these errors:



My intention is trying to build a lightweight version of k2pdfopt for my Alfred workflow. I need only four command line options: "-as", "-mode copy", "-dpi" and "-o".
What instructions are you trying to follow? The instructions I include with the source code say this:
Code:
Build Steps on OS/X (64-bit, gcc 6.2.0, compiled on OSX 10.12 Sierra)
----------------------------------------------------------------------
1. gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.c

2. g++ -Ofast -m64 -o k2pdfopt k2pdfopt.o -static-libgcc -static-libstdc++ -lk2pdfopt -lwillus -lgocr -ltesseract -lleptonica -ldjvu -lmupdf -lfreetype -ljbig2 -ljpeglib -lopenjpeg -lpng -lzlib -lpthread
The trick is going to be getting all of the libraries to compile. Honestly, I don't think this is worth your effort--you would have to substantially modify the code to really strip out everything but those options. Why not just use the OSX binary? Is the extra size really a problem?
willus is offline   Reply With Quote
Old 03-18-2018, 08:47 PM   #1534
xilopaint
Junior Member
xilopaint began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2018
Device: none
Quote:
Originally Posted by willus View Post
What instructions are you trying to follow? The instructions I include with the source code say this:
Code:
Build Steps on OS/X (64-bit, gcc 6.2.0, compiled on OSX 10.12 Sierra)
----------------------------------------------------------------------
1. gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.c

2. g++ -Ofast -m64 -o k2pdfopt k2pdfopt.o -static-libgcc -static-libstdc++ -lk2pdfopt -lwillus -lgocr -ltesseract -lleptonica -ldjvu -lmupdf -lfreetype -ljbig2 -ljpeglib -lopenjpeg -lpng -lzlib -lpthread
The trick is going to be getting all of the libraries to compile. Honestly, I don't think this is worth your effort--you would have to substantially modify the code to really strip out everything but those options. Why not just use the OSX binary? Is the extra size really a problem?
Oh, sorry! I didn't realise I had included a letter "g" at the end of the command. Now I'm getting other error:

Quote:
$ gcc -Ofast -Wall -m64 -o k2pdfopt.o -c k2pdfopt.c
k2pdfopt.c:76:10: fatal error: 'k2pdfopt.h' file not found
#include <k2pdfopt.h>
^~~~~~~~~~~~
1 error generated.
k2pdfopt.h is not in the same path of k2pdfopt.c.

Last edited by xilopaint; 03-18-2018 at 09:03 PM.
xilopaint is offline   Reply With Quote
Old 03-27-2018, 05:59 PM   #1535
pgodz
Junior Member
pgodz began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2018
Device: Kindle Paperwhite
Hey! I'm trying to preserve the original layout but bitmap the image and the text. Is it possible to disable scaling?

Thanks!
pgodz is offline   Reply With Quote
Old 03-28-2018, 08:44 AM   #1536
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 973
Karma: 7562459
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by pgodz View Post
Hey! I'm trying to preserve the original layout but bitmap the image and the text. Is it possible to disable scaling?

Thanks!
This is exactly what "-mode copy" is for. Set the output page dpi with -odpi. E.g.
k2pdfopt -mode copy -odpi 300 myfile.pdf
...will bitmap each page at 300 dpi and store in the output file.
willus is offline   Reply With Quote
Reply

Tags
ebook apps, k5 tools, kindle tools, kindle touch, tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing PDFs with another font Font PocketBook 4 11-12-2010 08:27 AM
Viewing Textbook PDFs... NJReader enTourage Archive 4 08-17-2010 05:17 PM
PRS-600 Restart bug while viewing PDFs? conundrum Sony Reader 2 03-04-2010 08:46 PM
More on viewing pdfs dso371 Bookeen 8 03-11-2008 07:15 PM
Viewing Untagged PDFs on Palm T|X Eroica Reading and Management 3 12-10-2007 01:44 PM


All times are GMT -4. The time now is 05:35 PM.


MobileRead.com is a privately owned, operated and funded community.