0

Due to latex using fonts with character codes different than that of UTF-8 as well as a small fraction of people not using UTF-8, in some workflows, the file name of the pdf and/or the title/creator of the metadata of the pdf can contain control characters and/or other unusual symbols if they are assumed to be UTF-8. This sometimes has adverse effects on old devices and outdated software that are bad at dealing with other encodings.

How can I modify the compiler or pass command line parameters so that it does not add any metadata to the pdf and sets the filename to something generic such as output.pdf regardless of the name of the original .tex file?

  • latex font encodings have nothing to do with pdf metadata. Better show a small real example of your problem. – Ulrike Fischer Oct 25 '22 at 07:32
  • 1
    There are various ways to do this using LaTeX, but they usually involve modifying the source file, while I understand you want to do this from the command line without changing the source. For this the easiest is probably to compile normally and then post-process to remove the metadata. For example QPDF can copy all pages of a pdf into an empty target file without metadata, like qpdf --empty --pages infile.pdf 1-z -- outfile.pdf (see https://qpdf.readthedocs.io/en/stable/cli.html#page-selection). – Marijn Oct 25 '22 at 08:13
  • For the (pdf)LaTeX approach see https://tex.stackexchange.com/questions/95080/making-an-anonymous-pdf-file-using-pdflatex. – Marijn Oct 25 '22 at 08:15

0 Answers0