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?

1 Answer 1


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.

  • (I fixed an earlier, worse answer.)
    – frabjous
    Aug 8, 2011 at 4:00
  • Thanks! It reduces the width and height. But why the storage size increases almost three times from 7.4M to 22M?
    – Tim
    Aug 8, 2011 at 4: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 8, 2011 at 4: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 3, 2013 at 17:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .