pdf24-DocTool.exe -compress: command prompt does not return

Home › Forums › PDF24 Creator › pdf24-DocTool.exe -compress: command prompt does not return

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #63597
    serenuszeitblom
    Participant

    Hello,

    invocing pdf24-DocTool.exe -compress from CMD does the job but the CMD is not finished. 2 lines are displayed

    ---------------------
    ============

    but no prompt. I didn't find a quit or exit option. I used it this way:

    "pdf24-DocTool.exe -compress -noProgress -dpi 120 -imageQuality 60 -outputfile filename.pdf inputfilename.pdf"

    Since I like to add this to a script it would be nice if anyounce could help me out there.

    Greetings,

    Franz-Josef

    #65445
    PDF24 Support
    Moderator

    Hello,

    the DocTool has most likely already finished at that point. pdf24-DocTool.exe is a Windows program with a graphical interface, not a console program. When you start such a program at an interactive command prompt, cmd does not wait for it and prints the prompt right away; the output of the DocTool then appears below the prompt. Simply press Enter and the prompt shows up again.

    In a batch script, cmd waits until the DocTool has finished before it runs the next line. You can also make the waiting explicit with start /wait, as recommended in the manual:

    start "" /wait pdf24-DocTool.exe -compress -noProgress -dpi 120 -imageQuality 60 -outputFile filename.pdf inputfilename.pdf

    Since version 11.31.0 there is also the flag -silent for unattended scripts: no dialogs are shown, errors are written to stderr and returned as exit code. Details: https://creator.pdf24.org/manual/11/#11119-exit-codes

    The options of the compress command are described here: https://creator.pdf24.org/manual/11/#11118-compress-pdf-files

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

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