View Single Post
Old 09-23-2014, 10:48 PM   #906
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 japinder View Post
Thanks guys.

Sent the correct link/file to both of you.

I believe I was struggling since I'm still a newbie to k2pdfopt & was indeed trying out these incompatible options. I've been trying the following options:

GUI:
-mode tm -c-
-mode tm -c- -ws 0.2

CMD line:
-gui- -wrap- -c-
-gui- -c- -n

& a lot of others I don't even recall.

The PDF actually contains a lot of colorful tables/diagrams etc, so I'm afraid, by trying to remove the background from the text, I would affect those tables/diagrams as well. So I've just contented myself with trying to do a normal grayscale + trim/crop.

Another thing, when I manually specify the crop margin & play around with the device selection, I've seen a white margin being 'added' by k2pdfopt, even if I input an already cropped PDF through briss. Could you advise what would be the correct device settings for Onyx Boox M96, 825x1200px, 150dpi. And should I try to change from the default of Kindle 1-5, 560x735px, 167dpi.

Thanks,
Jp
Yikes. That PDF has so many different colored texts and backgrounds and tables and graphics that it is really outside of what k2pdfopt was designed to process. The one saving grace is that the margins are very regular, so you can use the -cbox option to crop all the pages the same way (or you could just use Briss).

To crop each page and include the header and footer:

k2pdfopt -rt 0 -cbox .95,.48,6.63,10 -mode crop -c- -n- yourfile.pdf

This will take each cropped source page and turn that page into a single output page. The -c- and -n- are only if you really need grayscale output--I'm not sure you need this since your e-reader should convert to grayscale for you(?), and then you can just stay with native output mode. The -rt 0 just prevents k2pdfopt from checking the document orientation and thus saves processing time.

To crop each page and not include the header/footer;

k2pdfopt -rt 0 -cbox .95,.95,6.63,9.1 -mode crop -c- -n- yourfile.pdf

You probably don't need to do this since the Onyx Book M96 has such a large screen, but to fit the cropped source pages to landscape mode on your e-reader and break them across multiple pages:

k2pdfopt -rt 0 -cbox .95,.95,6.63,9.1 -mode fw -c- -n- -wt 128 yourfile.pdf

(You might try different values for -wt -- that will affect where it breaks the pages.)

You should be able to add your Onyx Book device settings to any of the above commands, e.g.

-w 825 -h 1200 -odpi 150


Of course, if you stay in native mode, I don't think it matters--hopefully your Onyx Book will fit the pages to its display.

Last edited by willus; 09-23-2014 at 10:53 PM.
willus is offline   Reply With Quote