![]() |
#361 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2013
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
![]() |
#362 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
Last edited by willus; 03-18-2013 at 08:44 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#364 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
|
|
![]() |
![]() |
![]() |
#365 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Mar 2013
Device: Sony PRS-T1
|
I've used k2pdfopt before with good results, however now i'm having trouble with terrible line breaking (check attachment).
Wrapping is on and obviously i'm using the -fc- parameter. Is there any way to improve the wrapping? I tried some different -ws values but I'm not getting anything remotely useable. This is the example (source) page: http://www.pdf-archive.com/2013/03/23/page17/page17.pdf Any help would be greatly appreciated. |
![]() |
![]() |
Advert | |
|
![]() |
#366 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
|
![]() Quote:
When doing multiple step conversion quality of pdf's gets lost... The text in the final version looks much worse than the original. is there a way to avoid image quality loss? Maybe this could be done by enforcing use of lossless image format? |
|
![]() |
![]() |
![]() |
#367 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
|
|
![]() |
![]() |
![]() |
#368 | |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 488
Karma: 1080260
Join Date: Sep 2012
Device: sony prs t1 kindle dx ipad
|
Quote:
If needed, I would then do quick OCR-ing in Acrobat or ABBYY FineReader. https://www.mobileread.com/forums/sho...=32066&page=14 Last edited by markom; 03-27-2013 at 12:28 PM. |
|
![]() |
![]() |
![]() |
#369 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
k2pdfopt -m 0 -sm -fc- -odpi 200 page17.pdf or k2pdfopt -m 0 -sm -fc- -wrap+ page17.pdf (you can also combine -odpi 200 and -wrap+). |
|
![]() |
![]() |
![]() |
#370 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
|
![]() Quote:
Thanks for explanation. Native mode does not work here, since the file is scanned. It might well be jpeg-based... Now, if the original pdf is composed of jpeg images, would the k2pdfopt convert it to a png based pdf in any step of the three below? But then I tried to repeat the steps by which I got the pdf with quality loss and I got stuck ![]() Here are the three commands I used: Code:
k2pdfopt -ui- -mode copy -n -grid 2x1x0 -w 1t -h 1t page01.pdf -o page1.pdf k2pdfopt -ui- -mode copy -ml 0.5 -mr 0.2 page1.pdf -o page2.pdf k2pdfopt -ui- -as -w 758 -h 942 -odpi 213 -om 0.04 page2.pdf -o page3.pdf Code:
Reading 4 pages from page1.pdf ... warning: unknown keyword: 'e-14' warning: unknown keyword: 'e-14' SOURCE PAGE 1 of 4 (5.9 x 8.3 in) ... 0 new pages saved. ![]() Could you tell me what is it that goes wrong here? I am attaching the original image... page01.pdf |
|
![]() |
![]() |
![]() |
#371 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
k2pdfopt -ui- -mode copy -cmax -1 -g 1 -bpc 8 -grid 2x1x0 -n- -w 1t -h 1t -dr 2 page01.pdf -o temp.pdf k2pdfopt -ui- -as -ml 0.4 -mr 0.4 -w 758 -h 942 -odpi 213 -om 0.04 temp.pdf -o out.pdf The 'e-14' issue is a bug in my code. Apparently scientific notation is not allowed for move commands in PDF files, and since I use %g as a formatter and your document has a /Rotate 90 directive in the page objects, there end up being some very small scientifically formatted values in the move commands (e.g. 1.00234e-14), which aren't allowed in PDF. So I'll fix that, but for now I've provided a work around. Note that if k2pdfopt didn't have this bug, native mode would have worked fine in the first command--it doesn't matter whether the source document is scanned or not. Native mode conversion is the best way to preserve the fidelity of the original file. Anyway, because of the bug, I had to use bitmap mode in the first conversion command. And yes, k2pdfopt, in bitmap mode, will effectively convert the scanned JPEG images to PNG (4-bit grayscale by default). Here are what the less obvious options do: -mode copy sets the output to be a copy of the input, with the output in bitmap mode. -cmax -1 -g 1 -bpc 8 preserves the source contrast, gamma, bits per pixel (none of this would have been necessary if I could have done a native mode conversion) so that you don't get dithering artifacts. -grid 2x1x0 breaks each page into 2 output pages (2 x 1 grid, no overlap) -n- turns off native mode (-grid turns it on, so you have to turn it back off--again, not necessary if native mode had worked) -w 1t -h 1t sets the output page size to mirror the gridded pieces of the source -dr 2 doubles the output resolution so that we don't lose fidelity (not necessary if native mode had worked) The other options are pretty straightforward and can be reviewed in my command-line options page. Last edited by willus; 03-29-2013 at 08:53 AM. Reason: Found reason for 'e-14' error. |
|
![]() |
![]() |
![]() |
#372 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
|
![]() |
![]() |
![]() |
![]() |
#373 |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Thank you. Happy to help. I have fixed the scientific notation issue for the next release.
|
![]() |
![]() |
![]() |
#374 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Apr 2013
Location: france
Device: koboglo
|
I tried to convert the pdf output of k2pdfopt, to epub format with calibre.
the goal is using the font size adjustment during reading on my kobo. (obviously, I used the native output option ) it's near Ok BUT epub pages are repeated 2 times! the pdf is ok when I read it with adobe reader or corelpdf. BUT pages are repeated when I open the pdf with PdfMasher (before conversion to epub)! do you understand why? and how to avoid this repeat? links to pdf and epub files are here: k2opt.pdf k2opt.epub thank you for help |
![]() |
![]() |
![]() |
#375 | |
Fuzzball, the purple cat
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
|
Quote:
|
|
![]() |
![]() |
![]() |
Tags |
ebook apps, k5 tools, kindle tools, kindle touch, tools |
|
![]() |
||||
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 |