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?
pdfinfo (part of poppler) can show you Creator and Producer. I get the following, for a PDF file created by XeTeX (with the
Creator: XeTeX output 2019.06.27:0505 Producer: xdvipdfmx (20180217)
Created by LuaTeX (with
Creator: TeX Producer: LuaTeX-1.07.0
Created by pdfTeX, with
latex followed by
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
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.
On the Mac, you can click on your pdf file in the Finder, and then do "Get Info" from the Finder menu (which is also the Command + "i" key).
You will see in the Get Info if it is created by pdfTeX. For instance, I just checked such a file, and it says:
Content Creator: TeX Encoding software: pdfTeX-1.40.20
Defaults for MiKTeX all outputs are PDF Version: 1.5
Created by PdfLaTeX:
Application: TeX PDF Producer: MiKTeX pdfTeX-1.40.20
Created by LuaLaTeX:
Application: TeX PDF Producer: LuaTeX-1.10.0
Created by XeLaTeX
Application: XeTeX output 2019... PDF Producer: MiKTeX-xdvipdfmx (20190503)