73

I'm trying to print a simple US Letter document, but for some reason, I just cannot manage to fit it properly onto A4 when printing multiple pages per-list.

I have tried converting the pdf using: gs -o print.pdf -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dFIXEDMEDIA -pPDFFitPage -dCompatibilityLevel=1.4 input.pdf

But this does not seem to have any effect on the document, it still shows as US letter.

Any way how to convert a pdf to A4 format?

Šimon Tóth
  • 8,098
  • 12
  • 40
  • 67
  • See also https://stackoverflow.com/questions/7446552/resizing-a-pdf-using-ghostscript which does not depend on a LaTeX installation. – rwst Jan 19 '20 at 14:29

1 Answers1

119

One solution that usually works is to use pdfjam from the texlive distribution

> pdfinfo in.pdf 
...
Producer:       Acrobat Distiller 6.0.1 (Windows)
...
Page size:      612 x 792 pts (letter)
Page rot:       0
File size:      66676 bytes
Optimized:      yes
PDF version:    1.4

> pdfjam --outfile out.pdf --paper a4paper in.pdf

> pdfinfo out.pdf 
Creator:        TeX
Producer:       pdfTeX-1.40.15
...
Page size:      595.276 x 841.89 pts (A4)
Page rot:       0
File size:      53963 bytes
Optimized:      no
PDF version:    1.5

Setting the paper size to something unconventional works with another switch, such as --papersize '{6.125in,9.250in}'.

As you can see here it also changed the PDF version, and dropped/modified other properties of the PDF, so you have to check if its suitable for your task.

Anaphory
  • 692
  • 1
  • 5
  • 17
konsumverweigerer
  • 1,306
  • 1
  • 9
  • 2
  • 2
    Tried to use this on a PDF document with forms. As a result I lost the forms and the saved data. – Yuv Nov 14 '17 at 19:02