7

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?

  • 1
    Have you checked the pdf properties? – daleif Jun 27 at 11:40
  • @daleif, Yes I did – Ali Jun 27 at 11:41
  • And what do you get? I know at least pdflatex is saying it is produced by pdftex, and it is not used by the others – daleif Jun 27 at 11:42
  • As long as I know nothing which indicate the source of the file if it is converted from Word or others – Ali Jun 27 at 11:44
  • Most converters mention the producer in the pdf properties. Sorry cannot help you more that that, you probably need to give us more information on what exactly you are asking – daleif Jun 27 at 11:46
14

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.

  • You can also just open the PDF in a text viewer, e.g. Notepad++, and then search for latex. You will see something like /Author()/Title()/Subject()/Creator(LaTeX with hyperref)/Producer(pdfTeX-1.40.19)/Keywords(). – ComFreek Jun 28 at 7:49
3

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

1

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.