[Tex/LaTex] How to know if a PDF file was created via LaTeX or XeLaTeX

pdf

When I open a PDF file and I want to know if it was created via LaTeX or XeLaTeX or LuaLaTeX and so on, because some PDF files were converted from Word. How can I do that?

Best Answer

For example, pdfinfo (part of poppler) can show you Creator and Producer. I get the following, for a PDF file created by XeTeX (with the xelatex command):

Creator:         XeTeX output 2019.06.27:0505
Producer:       xdvipdfmx (20180217)

Created by LuaTeX (with lualatex):

Creator:        TeX
Producer:       LuaTeX-1.07.0

Created by pdfTeX, with latex followed by dvipdfm:

Creator:         TeX output 2019.06.27:0505
Producer:       dvipdfmx (20180217)

For a file created by TextEdit on macOS with “Export as PDF”:

Creator:        TextEdit
Producer:       macOS Version 10.14.5 (Build 18F132) Quartz PDFContext

For a file created with my browser's Print as PDF:

Creator:        Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Producer:       Skia/PDF m75

Etc.

You don't have to use pdfinfo; other tools that show PDF properties should show the same data.

Also note that these are only the defaults; if someone wishes and knows how, they can set the properties to anything.