View Single Post
Old 06-21-2014, 10:45 AM   #296
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 khin99 View Post
Thank you Will. Indeed I find k2pdfopt very very useful. I have reformatted quite a number of pdf with it. I have also tried the command line prompt and found to be useful.

I am stumped with a few poorly scanned two column pdf which k2pdfopt "can not" reformat to a single column. I have used erase vertical lines option and cs option. I would be obliged if you could help me with this. I attach one of the problem pdf.
@Khin99 -- Thank you for the attachment. Because the scan is poor quality and the position of the pages changes a fair amount from page to page, a brute force cropping or gridding is best, I think. If you don't care about chopping up the title page, you can just do this:

k2pdfopt -grid 2x1x0 -mode fitpage source.pdf

-grid 2x1x0 breaks each page into 2 x 1 boxes.
-mode fitpage puts each of the gridded regions onto a single page

In the MS Windows GUI, you can just select "fitpage" for the conversion mode and put -grid 2x1x0 in the "Additional Options" box.

If you want to preserve the title page, it's a little trickier, but not too bad:

k2pdfopt -cbox1 0,0 -cbox2- 0,0,.5s,1s -cbox2- 0.5s,0s -mode fitpage source.pdf

-cbox1 0,0 creates a boxed region on page 1, upper left corner at 0,0 and (by default), extending the full size of the page.

-cbox2- 0,0,.5s,1s creates a boxed region on pages 2 and up, upper left corner at 0,0, with width 0.5 x the source page (0.5s) and height 1.0 x the source page (1s).

-cbox2- 0.5s,0s creates another boxed region on pages 2 and up, upper left corner starting half way (0.5s) across the source page and at the top (0s), and extending to the remainder of the source page (by default).
willus is offline   Reply With Quote