How to scale PDF content and page dimensions using PDF Page Resizer Command Line?

I have a set of PDF files. I need to re-scale all of these PDF files, preferably at the command line, I need a Command-line utility to batch resize PDF files. Is there any tool to batch resize (change dpi, e.g. from 600 dpi to 300 dpi) large amount (100,000+) PDF files?
---------------------------------
How to resize a PDF's pages?

I got a PDF file for which I want to change its pages' sizes; let's call it file.pdf. And I got another PDF file which will serve as the model to file.pdf; let's call it model.pdf.

To clarify: I want file.pdf's pages to be of equal measure as model.pdf's pages.
---------------------------------
Convert pdf to a different page size (US Letter -> A4)

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?
---------------------------------
How to scale the page content of PDF files? How to Scale to fit and resize PDF pages?

I'm try to resize a single PDF so that:
* its contents are scaled to fit the page.
* the new page has the size I want.
---------------------------------

image
We often received above questions from our customer, they want to resize the paper size of their PDF files, from Command Line on the Windows system. Fortunately, VeryUtils has a PDF Page Resizer Command Line software, this software can be used to resize the paper size in the PDF files from Command Line.

You may download the trial version of PDF Page Resizer Command Line from this web page first,

https://veryutils.com/pdf-page-resizer-command-line

After you download and unzip it to a folder, you may run a CMD window, then you can run following command line in this CMD window to resize the paper size of your PDF files,

pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "595x842" test.pdf _test-595x842.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "612x792" test.pdf _test-612x792.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "1000x1000" test.pdf _test-1000x1000.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "842x1191" test.pdf _test-842x1191.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "1191x1684" test.pdf _test-1191x1684.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "1684x2384" test.pdf _test-1684x2384.pdf
pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper "612x1009" test.pdf _test-612x1009.pdf

You can also call pdfresizer.exe from PHP script code to resize PDF pages on your server, for example,

<?php

echo shell_exec("D:\\pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper 595x842 D:\\test.pdf D:\\_test-595x842.pdf 2>&1");
echo shell_exec("D:\\pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper 595x842 D:\\test.pdf D:\\_test-595x842.pdf 2>&1");
echo shell_exec("D:\\pdfresizer.exe -$ XXXX-XXXX-XXXX-XXXX -resizepaper 842x1191 D:\\test.pdf D:\\_test-842x1191.pdf 2>&1");

?>

pdfresizer.exe is a Windows Command Line application, it doesn't support Linux system yet, if you wish use it on the Linux system, please feel free to let us know, we will figure out a solution to you asap.

No votes yet.
Please wait...

Related Posts

Leave a Reply

Your email address will not be published.