Go to Settings / Customize, then click the PDF Toolkit drop-down, right-click the Merge PDF command, and choose Edit.
Delete the first line from the function (it says @runmode hide). In its place, add a line that says @leavedoswindowopen.
Click OK to close the button editor and then OK to close the Customize dialog. Then try the function again. This time you should see a DOS window open (and stay open) which will let you read any error messages that may be displayed.
Thanks for that! It's most likely because you've included the / at the start of the alias name. Aliases are used with a / in front of them but you need to define it without that. If you change the alias name to pdftoolkit without the / I think it should work.
(This actually is really a bug on our part - we should handle that properly).
If anyone is still out there (...), whenever i use the Merge PDF command i have no idea as to where it is saving the merged file! Most of the time i am just using the Extract command, but as i am here, i thought i would ask for any input or advice anyone can share...
Looks like it doesn't specify an output directory. Depending on what pdftk.exe does, I'd expect it to either output the files next to the original files, or into the current directory, which is normally System32 these days (and wouldn't let you write files into it, so it may just be failing).
You could try changing the command to specify the the Source directory as the output explicitly. This is based on a guess of how the .exe works, so it may be wrong:
@runmode hide
@disablenosel
@nodeselect
@set fileMerged={dlgstringS|Enter name for merged PDF file (will be overwritten if exists)|{file$|noext}_merged.pdf}
/pdftoolkit\bin\pdftk.exe {allfile$} cat output {sourcepath}{$fileMerged} dont_ask
Removing the @runmode hide and adding a pause command at the end may let you see what's happening and if there are any error messages.
Following your advice i found that if fed files that do not have spaces in their names it runs fine, but if a file that is to be combined into the merged final file has a space in it ("C cbr.pdf"), it generates an error:
Error: Unexpected data in output section:
cbr
Exiting.
Errors encountered. No output created.
Done. Input errors, so no output created.
I guess i need to give everything no-space names then rename the final output to my liking. Thank-you for helping me define the problem!
in an attempt to fix the path/file not found issue with filenames containing blanks/spaces I got stuck.
It seems I cannot use an expression like {file|noext}_(-90°).pdf with blanks in the filename, since DO will add dquotes right after the curly braces and malform the target filename.
To get around that I tried the @nofilenamequoting modifier, but then the {allfile$} placeholder won't put quotes around the single filenames either.
I now need an idea to either have {allfile$} still use quotes even the @nofilenamequoting modifier is set. or prevent {file|noext} from adding quotes if the @nofilenamequoting modifier is NOT set.
Any thoughts? o) I looked into the docs, forcing quotes can only be done with {..|fileq} but this refers to writing external files with the filenames in, not useful here.
Please try the updated version I uploaded right now.
I did not fix your problem, as I noticed, that the most recent version I use, does things differently.
I checked with blanks/spaced in filenames and did not run into issues.