View Single Post
Old 08-10-2024, 09:51 PM   #2070
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: 1,303
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Used1 View Post
Attached the PDF, it's an academic paper. That's what I use this program for and it sometimes gets jumbled if they're in columns too. I appreciate your help!
This is why it really helps to see the source file. It has text along the bottom left edges, and that's causing problems. You have to crop out that area of the page. Fortunately you have a nice clean document.

Conversion #1
See k2pdfopt_window.png and cropregion_window.png attachments.
Here I tried to stay as close to your options as possible
1. I selected a crop region to ignore the edges of the page.
2. I selected "Erase horizontal lines" to ignore the divider lines on some of
the pages.
3. I de-selected auto-crop. That's really meant to be for poorly scanned
books that have photocopying artifacts at the edges of the pages. It doesn't
work very well.
4. I set max columns to 1 just so k2pdfopt would not look for multiple columns
5. I put -fc- in the additional options box to suppress a warning message.

It's also important that "Autostraighten" is selected. I set the font size to
18 points. I attached sample output to output_sample_18ptfont.pdf. The conversion was also pretty slow--200 s on my PC. See below for how I remedied that.

Conversion #2
(k2pdfopt_window_faster.png and
output_sample_faster.pdf)
Here I made some changes to make the conversion faster and the output file smaller. Rather than setting the output font size, which is slow for a number of reasons (part of it that k2pdfopt has to analyze the file to determine the font size), I just tell k2pdfopt that your kindle window size is much smaller than it actually is. It seems strange, but this has the same effect, and k2pdfopt processes everything at a lower dpi, so it goes much faster and makes a smaller output file. Also, I set the input dpi to 300 dpi since that is the native resolution of the source file. Normally it defaults to twice the output dpi. Finally, I added "-rt 0" so k2pdfopt does not waste time verifying the orientation of the source file. This brought the conversion time down from 200 s to 45 s on my PC. The output file size is ~11 MB.

Conversion #3
(k2pdfopt_window_fastest_and_smallest.png and output_sample_fastest_and_smallest.pdf)
I added -bpc 1 to the additional options since the source document is just a monochrome (1-bit) document. This gets the output down to ~7 MB from an original size of ~20 MB in conversion #1.
Attached Thumbnails
Click image for larger version

Name:	k2pdfopt_window_18pt.png
Views:	404
Size:	152.5 KB
ID:	210106   Click image for larger version

Name:	cropregion_window.png
Views:	395
Size:	378.4 KB
ID:	210107   Click image for larger version

Name:	k2pdfopt_window_faster.png
Views:	403
Size:	107.9 KB
ID:	210109   Click image for larger version

Name:	k2pdfopt_window_fastest_and_smallest.png
Views:	400
Size:	108.8 KB
ID:	210111  
Attached Files
File Type: pdf output_sample_18ptfont.pdf (735.0 KB, 377 views)
File Type: pdf output_sample_faster.pdf (300.0 KB, 373 views)
File Type: pdf output_sample_fastest_and_smallest.pdf (139.2 KB, 393 views)

Last edited by willus; 08-11-2024 at 09:00 AM.
willus is offline   Reply With Quote