pdf24-DocTool.exe in der Aufgabenplanung hängt nach der ersten Datei

Start › Foren › PDF24 Creator › pdf24-DocTool.exe in der Aufgabenplanung hängt nach der ersten Datei

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

    hello,
    I would like to use a loop in
    powershell to convert .rtf files to PDF. This only seems to work if I run the script manually (for Example in PS Ise). If I run the script with the Task Scheduler, then only the first file is converted and the script waits. The call is made with "Start-Process -PassThru -FilePath $pdf24Path -argumentlist $pdf24scriptArgs -wait"
    It looks as if the script is waiting for a response from the process.

    $pdf24Path is the path to "C:\Program Files\PDF24\pdf24-DocTool.exe"

    $pdf24scriptArgs = "-convertToPDF -profile `"default/good`" `"$rtfFile`" -outputfile `"$pdf_FileName`""

    Does anyone have any ideas?
    Thanks Stephan

    #20197
    PDF24 Support
    Moderator

    Hello,

    sorry for the late reply. Without the -silent switch, the DocTool reports problems and questions in dialog windows. In a scheduled task such a window is usually not visible, so the process keeps waiting for it and Start-Process -Wait does not return.

    Please update to the current version of PDF24 Creator and add -silent to your arguments (available since version 11.31.0). In silent mode the DocTool shows no dialogs, writes errors to stderr and ends with an exit code instead of waiting for input. Your arguments already contain -profile and -outputFile, which silent mode requires. The exit codes are listed in the manual: https://creator.pdf24.org/manual/11/#11119-exit-codes

    You can also convert all RTF files with a single call instead of a loop: pass the folder as input file together with -expandDirs, -includeFileExtensions .rtf and -outputDir for the target folder. The options are described here: https://creator.pdf24.org/manual/11/#11-pdf24-doctoolexe

    RTF files are converted with Microsoft Word if it is installed. If the task still hangs, please tell us whether a WINWORD.EXE process remains open in the Task Manager and whether the task runs only while you are logged on or also without a logged-on user.

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