Get latex code from a PDF file

I have a CV in PDF format that needs to be converted to LaTeX code. Is there a way to "reverse engineer" a PDF file to get the latex code?

+8
pdf latex reverse-engineering
source share
4 answers

Short answer: No

Slightly long answer:

You can get plain text, but it's not possible to restore the original source of latex.

You may be able to import the PDF into a word processor and export LaTeX from it (or AbiWord of KOffice can do this, if I remember correctly), but the result will be small. This will not give you the original LaTeX, but a very poor approximation. I think re-creating CVs from scratch in LaTeX will be easier.

+7
source share

Not. An explanation can be found here :

The task simply cannot be done automatically: DVI, PostScript and PDF are the “final” formats , presumably not subject to further editing - the information about the origin was discarded. Thus, if you lost your (La) TeX source (or you never had a document source that you need to work on), you have a lot of work to do. In many cases, the best strategy is to reprint the entire document, but this strategy should be limited by the size of the document and the typist’s potential skills.

+1
source share

The latex file will be printed in PDF format, converting the contents into Postcript commands.

0
source share

Just as you can automatically reverse engineer C code (albeit not very readable and with certain restrictions) from a compiled exe, you should be able to reconstruct LaTeX code from a compiled PDF. There seem to be no tools around that even try to do this. This would be an interesting task to implement.

There are some studies in this area: http://www.fi.muni.cz/~sojka/dml-2011-baker-sexton-sorge.pdf

0
source share

All Articles