8

The answers to this question contain pdf cropping utilities that will give smaller files than Eric Doviak's original, but as far as I can tell they only work in Linux.

Is there a way to make them work in Windows, or an equivalent native utility? I also need to be able to run it from command line.

(Motivation: I managed to get fancy-preview running for my dissertation, but it turns my 50-page dissertation from a compact 1MB into 10MB. I understand this as due to a large number of uncompressed tooltips being embedded, and would like to avoid that.)

3
  • The script you are referring to uses Bash as command interpreter. Cygwin is a Unix-like environment for Windows. It provides all the required tools: Bash, ghostscript, Perl, Pdftk.
    – AlexG
    May 22, 2013 at 14:08
  • 1
    Do you want to crop or compress the pdf (make the files smaller)? This in unclear from the question. Nov 3, 2015 at 9:49
  • @fileunderwater The overall goal is to compress the files after they have been cropped, if I remember correctly, or to crop them directly to a smaller file size. It's been a long time, though, so if you think there's a specific query that would lead people here that isn't covered here yet by all means add an answer to address it.
    – E.P.
    Nov 3, 2015 at 23:58

2 Answers 2

2

Check out PDF manipulation tips, Part 1. I haven't used this functionality before myself, but ghostscript can apparently handle this from the command line with:

gswin32c.exe -sDEVICE=pdfwrite -dMaxSubsetPct=100 -dPDFSETTINGS=/ebook -sOutputFile="outfile.pdf" -dNOPAUSE -dBATCH "infile.pdf"

where -dPDFSETTINGS is used to define how images are resampled. Using -dPDFSETTINGS=/screen will yield dpi=72. I just tried this with a sample pdf and it seems to work fine.

3
  • 1
    And to clarify; my solution only deels with resizing/compressing a pdf, not cropping which was included in your linked question. However, your main motivation seems to be to compress the pdf, not to crop it. May 22, 2013 at 14:17
  • For cropping also see this previous question on using ghostscript: stackoverflow.com/questions/6183479/… May 27, 2013 at 8:51
  • The problem of the file size with solution (at least under Linux) is also mentioned in the manual to fancy-preview (which is in a manual to fancytooltips). Note the command line option pdfcrop Aug 11, 2013 at 20:02
11

Use BRISS:

It's light and free. And it's portable (you don't need to install anything). I tried it on Windows 8.1.

You can download it from here and run it:

1- "l": load

2- "cancel" (or enter page numbers to be excluded).

3- Adjust the top-left and bottom-right corners of the desired rectangle with mouse.

4- "c": crop and save the cropped file.

2
  • 1
    What about automatic cropping of white margins? What if the document has multiple pages and they all have different margins?
    – AlexG
    Sep 6, 2016 at 14:54
  • BRISS automatically identifies the margins and sets the cropping area for each page. It is precise, although it may be "not ideal". You can also change the margins for each page manually.
    – Alisa
    Sep 6, 2016 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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