How can we uniform all PDF paper sizes

83 Views Asked by At

What utility, How's its syntax usage, which can uniform all PDF paper sizes on Linux the simplest way, preferably by CLI?

1

There are 1 best solutions below

0
Jukka Matilainen On

You could give Ghostscript a try; it is a versatile tool for working with PDF files.

Something like this might work for you:

gs -o output.pdf -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dPDFFitPage input.pdf ...

If the paper size you want is not on the list of known paper sizes, you can give a custom paper size in points (1/72ths of an inch) by -dDEVICEWIDTHPOINTS and -dDEVICEHEIGHTPOINTS.