03-13-2018, 09:40 PM | #1531 |
Guru
Posts: 924
Karma: 53902736
Join Date: Jun 2015
Device: multiple
|
Sorry.
|
03-17-2018, 03:49 PM | #1532 | |
Junior Member
Posts: 5
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:
Last edited by xilopaint; 03-17-2018 at 03:52 PM. |
|
03-18-2018, 02:25 PM | #1533 | |
Fuzzball, the purple cat
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
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 |
|
03-18-2018, 08:47 PM | #1534 | ||
Junior Member
Posts: 5
Karma: 10
Join Date: Mar 2018
Device: none
|
Quote:
Quote:
Last edited by xilopaint; 03-18-2018 at 09:03 PM. |
||
03-27-2018, 05:59 PM | #1535 |
Junior Member
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! |
03-28-2018, 08:44 AM | #1536 | |
Fuzzball, the purple cat
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
k2pdfopt -mode copy -odpi 300 myfile.pdf ...will bitmap each page at 300 dpi and store in the output file. |
|
04-19-2018, 08:07 PM | #1537 |
Enthusiast
Posts: 25
Karma: 37930
Join Date: Mar 2018
Device: Kobo TouchC
|
How to discard the hidden text?
My Kobo Touch C is having problems reading a very big pdf file - 1466 pages - that also has hidden text. I think that just removing the hidden text would solve my problem. I was able to do this once, but only with a subset of the file that I set u to test it but now can not repeat the results.
Could some one help me show me the options to mantaing everything - size, dpi, color etc. - but just get rid of the hidden text? |
04-19-2018, 11:08 PM | #1538 | |
Fuzzball, the purple cat
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
k2pdfopt -i myfile.pdf You can then select options to match, e.g. k2pdfopt -mode copy -odpi 200 -c -g 1 -sh- -cmax 1 -ocr- myfile.pdf This copies the dimensions, sets bitmap DPI to 200, turn on color output, sets gamma to 1 (no change), turns off sharpening, turns off contrast adjust, and turns off OCR (no hidden layer). You can try just a few pages of conversion by adding: -p 1-10 (convert the first 10 pages only). |
|
04-20-2018, 10:19 AM | #1539 | |
Enthusiast
Posts: 25
Karma: 37930
Join Date: Mar 2018
Device: Kobo TouchC
|
Quote:
It worked! I don't know if you are still developing the the software, although I can see that you are very active in the forum, but maybe this is a feature worth implementing: deleten the hidden text layer. In my case the Kobo just couldnt cope with the hidden text. Whenever I moved th image to reposition it I would get the image of the hidden text instead of the actual image layer. It would freeze there and the only way I was able to circunvent it was to put the device to sleep, when waken back it would show me the image like nothing had happend... Anyways great piece of software! Just the learning curve that is a bit steep. Last edited by Ramo; 04-21-2018 at 01:23 PM. |
|
04-20-2018, 11:17 AM | #1540 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Removing the text layer has its downsides. Search for text will no longer work. All you have is a set of images.
|
04-20-2018, 03:02 PM | #1541 | |
Enthusiast
Posts: 25
Karma: 37930
Join Date: Mar 2018
Device: Kobo TouchC
|
Quote:
I might as well get rid of the whole thing. It is just impressing me how hard it has been to find a tool to such a simple job. At least I think it is simple. Last edited by Ramo; 04-21-2018 at 01:26 PM. |
|
04-21-2018, 11:21 AM | #1542 | |
Fuzzball, the purple cat
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
|
|
04-21-2018, 01:41 PM | #1543 |
Enthusiast
Posts: 25
Karma: 37930
Join Date: Mar 2018
Device: Kobo TouchC
|
|
04-21-2018, 02:38 PM | #1544 |
Fuzzball, the purple cat
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
As I suspected, the images are stored in JPEG 2000 format (you can see this when you use the k2pdfopt -i option), which taxes most PDF readers significantly more than JPEG or PNG. Moreover, they are 600 dpi--very high res. That is probably why your reader does not like displaying the file--not because of the hidden text. The default k2pdfopt output is PNG ("Flate"), which is much faster to display, but, as you noted, balloons the file size considerably depending on your chosen resolution and color depth. You might try leaving OCR selected (-ocr m) rather than disabling it. I'll bet it will still work fine and you'll then be able to search the document.
There is not a trivial way to simply remove hidden text from a PDF and leave everything else exactly the way it is. I could maybe make it easier to use the method I showed you with a single command-line option to try to intelligently choose the parameters, but in terms of leaving all of the bitmaps in exactly their original format (highly compressed JPEG 2000), I don't have a way to do that. |
04-22-2018, 08:23 AM | #1545 | |
Enthusiast
Posts: 25
Karma: 37930
Join Date: Mar 2018
Device: Kobo TouchC
|
Quote:
I learned about JPEG 2000 just 2 minutes ago when downloading a set of scanned images from archive.org and failing to make scantailor work on them. Talk about Sincronicity! Way better suport that I've ever had from any company! You're awesome! Just out of curiosity, do you have a guess of if KOreader would do a better job with this kind of pdf instead of the Nikel standart software on my Kobo TouchC? And how did you found out about the resolution of the images on the PDF, is there a option to do that on K2PDFopt? I Couldn't find it. And the JPX & JBIG2 on brackets on -i are the file formats of the imagens than? |
|
Tags |
ebook apps, k5 tools, kindle tools, kindle touch, tools |
|
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 |