With ghostscript, how to upscale a PDF file that is wider than taller so that the new width matches the width of a portrait A4 sheet of paper?
1
vote
0
answers
49
views
Let's take a PDF file that is slightly wider than taller, e.g., https://we.tl/t-iihJ3gMsrA :
pdfinfo input.pdf | grep "Page size"
Page size: 397.349 x 378.153 pts
Let's try to upscale it so that the new width matches that of a portrait A4 sheet, i.e., 210 mm or 595 pt. How to do this with
gs
only? So far, we tried
gs -o output.pdf -sDEVICE=pdfwrite -dFIXEDMEDIA -dPDFFitPage -dAutoRotatePages=/None -dDEVICEWIDTH=5950 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH input.pdf
and variations thereof, but the output came out rotated counterclockwise 90° :-(. Any adjustment to the command so that the output comes out upright?
Asked by AlMa1r
(1 rep)
Apr 19, 2025, 07:37 PM
Last activity: Apr 21, 2025, 12:47 PM
Last activity: Apr 21, 2025, 12:47 PM