View Single Post
Old 05-04-2013, 10:29 AM   #415
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by kalehrl View Post
Hi willus
Whenever there is some text in the middle of the page between 2 columns, the output is wrong. Please find attached the examples. Is there any way to rectify it?
Interesting magazine. I had read some about Raspberry Pis--they look like a fun hobby device.

I tried some different options and this is the best I could come up with. It's not perfect, but it did keep the basic flow in the right order.

k2pdfopt -cgr 0.6 -ch 1 -crgh 0.01 magpi.pdf

-cgr 0.6 gets k2pdfopt to look over a wider range than normal for column splits--the middle text moves the column splits outside of its normal range (0.33). A value of 1.0 scans the full page width for column splits.

-ch 1 reduces the minimum region height for column breaks from 1.5 inches to 1 inch since the middle text is less than 1.5 inches high.

-crgh 0.01 allows a slightly smaller-than-default (default = 1/72 inch) gap to separate regions of differing column widths since the vertical gap between columns of different widths is small in this case.

You might also try -col 4, but that may result in "over-columnizing" on other pages. I prefer to avoid it unless the bulk of the document has 3 or more columns. See also this post with a similar issue.

Last edited by willus; 05-04-2013 at 10:32 AM.
willus is offline   Reply With Quote