When I open a PDF file compiled from LaTeX with a text editor (e.g. Notepad++), the content of the file is a not human readable and it looks like below, so it seems to me that the information cannot be processed by potential crawlers.

n×å9.â^Ñäùàɨ•” HTÏ•ì#ò Ž–}q”mäŠ9ÒrbtRšá™g—û}Açú¦nƒÖ…‡­”jKœˆ FàƵÀmþåá•N:º‚~éWF¶DX‹m#‚D˜Àm;Ñum?OŠÀÊ¢ßÎ[ÈuóõÄ÷;Ý6"-@pñäÙ(ÖXÜÕËaœyýûdRìørêÑbβ(\n^Øþ2Öƒ;¬÷ª»¦Òv0þ®±úßY'°³½‹%…ߥºíúŸKåÒ춶\êæñÕ_–áúª –ò1üj9¶,Ö×VæY¼wæ¬Döð}]

Is there a possibility to generate the PDF file so that when the PDF document displays an information like "Specific detail 1", I can also find this string "Specific detail 1" in the binary content of the file when I open it with a text editor?

This is useful for example when a PDF resume is created in LaTeX and it must be automatically parsed by various text analyzers.

  • 2
    Welcome to TeX.SX! What you see is called compression and contains the textual output (pdftotext etc. are able to process it). Which crawler do you refer to that does not support compression? – TeXnician Aug 29 '18 at 9:22
  • I didn't know that crawlers support reading compressed PDFs. I assumed that if it's not human readable then it's also not crawler readable. – Alexandru Irimiea Aug 29 '18 at 22:12

For pdfTeX

\pdfcompresslevel = 0 %
\pdfobjcompresslevel = 0 %

For LuaTeX

\pdfvariable compresslevel = 0 %
\pdfvariable objcompresslevel = 0 %

For use with (x)dvipdfmx (XeTeX, upTeX, etc.)

\special{dvipdfmx:config z 0}
\special{dvipdfmx:config C 0x40}
  • 1
    Probably in the near future I'll add an interface for this to expl3. – Joseph Wright Aug 29 '18 at 9:25
  • 1
    +1, but I wonder whether a crawler that doesn't support PDF compression likes BT /F8 9.9626 Tf 148.712 707.125 Td [(My)-333(sup)-28(er)-333(imp)-28(ortan)28(t)-334(text.)]TJ 154.421 -567.87 Td [(1)]TJ ET – TeXnician Aug 29 '18 at 9:27
  • @TeXnician Sure, we can't do that much about that! – Joseph Wright Aug 29 '18 at 9:28
  • 3
    @AlexG Sure, but the point is that if a crawler can't understand PDF compression, only 'text' in a PDF, it probably can't follow the kerning and whatever either – Joseph Wright Aug 29 '18 at 10:14

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.