AutoSaveFileCmd: open generated PDF automatically after saving

Start › Foren › PDF24 Creator › AutoSaveFileCmd: open generated PDF automatically after saving

Schlagwörter: ,

Ansicht von 2 Beiträgen – 1 bis 2 (von insgesamt 2)
  • Autor
    Beiträge
  • #18656
    adrian422
    Teilnehmer

    Hello,

    I am currently configuring PDF24 Creator 11.30.1 x64 for a silent/machine-wide installation.

    The PDF24 printer is configured with:

    <code class="language-reg">[HKEY_LOCAL_MACHINE\SOFTWARE\PDF24\Services\PDF]
    "Handler"="autoSave"
    "AutoSaveDir"="C:\\Temp\\PDF24Test"
    "AutoSaveFilename"="%Y-%m-%d %H-%M-%S $fileName"
    "AutoSaveUseFileCmd"=dword:00000001
    

    Automatic saving works correctly.

    I also verified that AutoSaveFileCmd is executed. For example:

    <code class="language-reg">"AutoSaveFileCmd"="cmd.exe /c echo TEST >> C:\\Temp\\pdf24-command.txt"
    

    creates the file successfully.

    I also verified that ${file} is substituted correctly. It contains the complete generated PDF path, for example:

    <code class="language-text">C:\Temp\PDF24Test\2026-09-14 12-49-10 -Lorem ipsum dolor sit amet, consete - Notepad.pdf
    

    My problem is that I want to automatically open the generated PDF with the user's default PDF application after saving.

    I have tried:

    <code class="language-reg">"AutoSaveFileCmd"="\"C:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\Acrobat.exe\" \"${file}\""
    

    and even:

    <code class="language-reg">"AutoSaveFileCmd"="\"C:\\Program Files\\Adobe\\Acrobat DC\\Acrobat\\Acrobat.exe\""
    

    but Acrobat does not open.

    I also tried:

    <code class="language-reg">"AutoSaveFileCmd"="cmd.exe /c start \"\" \"${file}\""
    

    but nothing happens.

    Interestingly, simple commands such as echo work, so AutoSaveFileCmd itself is definitely executed.

    Is there a recommended way in PDF24 Creator 11.30.1 to launch a GUI application / the user's default PDF viewer from AutoSaveFileCmd after an auto-save?

    Would using a separate PDF24 printer/service make a difference, or is there another command/syntax specifically intended for opening the generated PDF?

    Thank you!

    #19310
    PDF24 Support
    Moderator

    Hello,

    thank you for the detailed description. PDF24 runs the command as cmd.exe /C "<your command>" in a hidden window, with the folder of the saved file as working directory. A program that is started directly from this hidden cmd.exe (like Acrobat.exe "${file}") can take over the hidden state, so Acrobat may start without a visible window. An invisible Acrobat that keeps running would also receive the next files you open, which could explain why the start variant showed nothing either.

    Please try this:

    1. Close Acrobat and check in the Task Manager that no Acrobat.exe process is left. End remaining ones.
    2. Set the command without the extra cmd.exe (PDF24 already runs it through cmd.exe /C):
    "AutoSaveFileCmd"="start \"\" \"${file}\""

    start opens the file with the default PDF application of the user and with a normal window.

    If that still does not work, you can try "AutoSaveFileCmd"="explorer.exe \"${file}\"", which also opens the file with the default application.

    Please let us know whether this works.

Ansicht von 2 Beiträgen – 1 bis 2 (von insgesamt 2)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.