4

I was wondering how to change width and height of each page of a pdf?

In my scanned pdf, each page has paper size too big, 31.98 × 49.20 inch. I would like to shrink the width and height to smaller ones which are normally seen in pdf files.

Are there some applications or programming tools to accomplish this?

Tim
  • 98,580
  • 191
  • 570
  • 977

1 Answers1

4

You could try ghostscript (all one line):

gs -sOutputFile=output.pdf -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -dPDFFitPage -f input.pdf

Change a4 to letter for North America.

frabjous
  • 8,421
  • 1
  • 32
  • 33
  • (I fixed an earlier, worse answer.) – frabjous Aug 08 '11 at 04:00
  • Thanks! It reduces the width and height. But why the storage size increases almost three times from 7.4M to 22M? – Tim Aug 08 '11 at 04:14
  • It converts it to PostScript and back, but why that should increase file size so dramatically, I don't know. You probably also go from PDF version 1.5+ to 1.4, which may have something to do with it. – frabjous Aug 08 '11 at 04:21
  • Ghostscript may have to rasterize stuff PS does not support. For simple PDFs, this works nicely. Still looking for a solution that is PDF-only. – Raphael Jun 03 '13 at 17:21