Question

PROBLEM

Many sites are trying to explain it, but error message is pretty unclear. In my case I had a lot of pdf files to merge and for some reason one file was a big problem.

Ghostscript unrecoverable error undefinedfilename
Was it helpful?

Solution 2

SOLUTION

If you got this message then merge files with asterix

gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -dQUIET -dSAFER -sOutputFile=out.pdf *.pdf

If out.pdf is OK It means "your file path or file does not exist". Now is the message "undefinedfilename" already clear.

OTHER TIPS

I received the same error by neglecting the dash before dBATCH. So

gs dBATCH ...

instead of

gs -dBATCH ...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top