Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have another device, an eInk ebook reader (Onyx Boox), that has this wonderful feature, "auto-crop", that auto-detects the white margins in pdf (with a given degree of "aggression"), and zooms out it.

Sometimes, at night, I prefer to use my notebook to read ebooks. This option would make the experience much better, but so far I can't find this feature in any PDF software I've tried.

How do you read PDFs that "auto-crop" the white margins on a Linux system?

I'm not interested in permanently removing the white space out of PDFs; just hiding it for sake of a reading session.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Not really, and not all kinds of PDFs (that at least is my experience: the closest I got was, if memory serves, FoxIt Reader). I usually go a more radical way and crop the PDFs at the source using tools such as PDFquench, or PDFcrop; I too used to read them on a Onyx A60 (also tried annotating them and reading back with Okular), before switching to a rooted PRS-T1.

It would perhaps be possible to create a script to get a PDF, make a cropped copy of it, and run a plain old PDF viewer on the copy, deleting it upon closure.

share|improve this answer
    
That's bad news. I'll wait a moment and then I'll try to make such script. It shouldn't be that difficult. –  Adam Ryczkowski Jun 10 '13 at 5:52
1  
I've tried myself, and the linked PDFcrop utility seems to have problems with zero-sized BBoxes. The pdfcrop I use turned out to be a script by one Heiko Oberdiek, with the --pagesize and --margins options. Note that, depending on the PDF, the output size may increase considerably. –  lserni Jun 10 '13 at 6:53
    
I understand, that the PDFcrop doesn't provide option for "fuziness" of the cropping (like the pdf reader for Onyx does), so if the PDF have a header/footer far away from the text, it still always includes it, right? –  Adam Ryczkowski Jun 10 '13 at 7:46
    
Yes... I've been bitten by the script bug :-), so I am too being experimenting with cropping (I usually did it visually, but having a script catches my fancy). pdftk allows uncompressing the PDF and exposing the MediaBox, now I'm thinking of counting all the objects with their coordinates, and build a "heat map"... –  lserni Jun 10 '13 at 7:51
1  
I've been playing with the iText library in Java. I've now a nifty little framework to trim a PDF in (mostly) any way I decide. Could I perhaps interest you in being a beta tester? :-) –  lserni Jun 13 '13 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.