Batch file to reduce pdf size

Home › Forums › General › Batch file to reduce pdf size

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #63770
    wdgeest1
    Participant

    Is it possible to use PDF24 programmatically like using Batch File or VBA or any other programming language, so that I can reduce PDF size of files in a seleceted map ?

    Thanks

    #63771
    Stefan Ziegler
    Keymaster
    #64594
    wdgeest1
    Participant

    Thanks, Stefan. In the manual, I do not see the "input map" where my files are stored (to be compressed). How do I add this "hot folder" where the files (to be compressed) are stored.. ?
    Input map: C:Files-to-compress
    Output map: C:Files-that-are-compressed
    thanks !

    #65343
    PDF24 Support
    Moderator

    Hello,

    PDF24 has no watched folder (hot folder) yet, but the command line can compress all files of a folder in one go. Call pdf24-DocTool.exe with these options:

    • -compress and the compression values -dpi, -imageQuality and, if needed, -colorModel
    • -expandDirs and your input folder C:\Files-to-compress instead of single files: the folder is replaced by the files in it
    • -includeFileExtensions .pdf, so that only the PDF files of the folder are used
    • -outputDir C:\Files-that-are-compressed for the output folder. The compressed files get a suffix with the values, e.g. _144dpi_75%
    • -silent (since version 11.31.0) for unattended runs from a batch file: no windows are shown, errors are returned as exit code

    The options are described here:

    Compressing single files also works online: https://tools.pdf24.org/en/compress-pdf

    #65366
    PDF24 Support
    Moderator

    Hello,

    a correction to our answer above: PDF24 does have a hot folder for compressing, since version 11.31.0. Open PDF24 Compress (pdf24-Compress.exe in the PDF24 installation folder) and choose a folder under Hot folder. PDF files placed in this folder are compressed automatically and saved next to the original with the Save file suffix. This works while PDF24 Compress is open.

    For unattended runs, for example as a scheduled task, the command line described above remains the way to go.

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