Basic pdf page handling

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.

1 Like

Once again, Thank-you.

The error is "The system cannot find the path specified."

Where is the pdftk.exe file ?

In lister, write /pdftoolkit with your keyboard then enter. Filepdftk.exe is here or in a bin sub folder?

C:\Program Files (x86)\PDFtk\bin\pdftk.exe

Alias /pdftoolkitneed to point to C:\Program Files (x86)\PDFtk not C:\Program Files (x86)\PDFtk\bin\

Thank-you for all your efforts!

That does not seem to be the solution either as i still get the same error in the DOS window and the operation is not performed-

Can you post a screenshot of the Aliases page in Preferences?

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).

Thank-you!!! Much better, all seems correct now-

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... :slight_smile:

Thank-you!

Which Merge PDF button are we talking about?

or

(or another maybe?)

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!!!