Change PDF page size from the command line

Home › Forums › PDF24 Toolbox › Change PDF page size from the command line

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #63663
    tuanpdf
    Participant

    Hi support,

    I am interested to apply pdf page size with command line.  Do we have command line available for this option?

    Thanks

    Tuan

    #65412
    PDF24 Support
    Moderator

    Hello,

    yes, with the PDF24 Toolbox of PDF24 Creator (Windows). The tool Change PDF page size can be run from the command line with a job file:

    1. Create a job file, e.g. C:\Data\job.json (write the backslashes in paths twice):
    { "action": "changePdfPageSize", "pageSize": "A4", "pageOrientation": "auto", "fileInfos": [ { "file": "C:\\Data\\test.pdf", "name": "test.pdf" } ] }

    pageSize can be A0 to A6, letter, legal or your own size like 210x297mm or 8.5x11inch. pageOrientation can be auto, portrait or landscape.

    1. Run the job:
    "C:\Program Files\PDF24\pdf24-Toolbox.exe" -processJob C:\Data\job.json C:\Data\result.json
    1. In result.json you then find the new PDF under outputFiles (file = path in the temp folder %TEMP%\PDF24, name = intended file name). Copy this file to the folder you want.

    Description of -processJob: https://creator.pdf24.org/manual/11/#912-process-a-job

    Without the command line, the tool is also online: https://tools.pdf24.org/en/change-pdf-page-size

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.