1

I'm using this

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=finished.pdf  file1.pdf file2.pdf file3.pdf

to concatenate 3 PDF files, and gs inexplicably takes the title of one of them and uses it as the title of the new document (shown in the title bar by the PDF viewer). I wonder if the new title could be specified explicitly?

MWB
  • 724
  • 1
    The 2 methods described here appear to work: Where is metadata for PDF files? Can I insert metadata into any PDF file? . FYI it doesn't seem to be necessary to specify an entire /DOCINFO structure so for example gs ... -sOutputFile=finished.pdf -f file1.pdf file2.pdf file3.pdf -c "[ /Title (My New Title) /DOCINFO pdfmark" – steeldriver Mar 28 '21 at 23:24
  • @steeldriver Thanks. This should probably be the answer? – MWB Mar 29 '21 at 02:28
  • Indeed, this is the answer. "After the fact", you can use exiftool to add/edit metadata on an already created PDF, https://askubuntu.com/questions/591289/how-to-automatically-set-the-pdf-title-tag-with-the-file-name?rq=1. Also pdftk: https://askubuntu.com/questions/591283/how-to-change-pdf-title-in-kubuntu?noredirect=1&lq=1 – vanadium Mar 29 '21 at 09:07

0 Answers0