Basic pdf page handling

Showing off my ignorance once more...
image

Aha! Looks like that would be the first correlating the menu entry names!

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.

Thank-you, Leo!

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!

Hi folks,

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.

Thank you! o)

Please ignore what I posted..
I kind of mixed {allfile|..} placeholder with {file} which confuses the pdftk.exe, and me too. o)

If i may further note, the same is true when specifying the name of the output file-

Thank-you for considering the issue!

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.

Find it here:

Thank-You!!!