开发者

get latex code out of a PDF file [closed]

开发者 https://www.devze.com 2023-01-05 07:50 出处:网络
Closed. This question is off-topic. It is not c开发者_JAVA技巧urrently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not c开发者_JAVA技巧urrently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

I have a CV in PDF format which is to be converted to LaTeX code. Is there a way to 'reverse engineer' the PDF so that I can get the latex code?


Short answer: No

Slightly longer answer:

You may get the plain text back but you can't restore the original latex source.

You may be able to import PDF into a word processor and export LaTeX from it (Either AbiWord of KOffice can do that, if I remember correctly), but the result will not be pretty. This won't get you the original LaTeX, but a very poor approximation. I think recreating the CV from scratch in LaTeX will be easier.


No. An explanation can be found here:

The job just can’t be done automatically: DVI, PostScript and PDF are “final” formats, supposedly not susceptible to further editing — information about where things came from has been discarded. So if you’ve lost your (La)TeX source (or never had the source of a document you need to work on) you’ve a serious job on your hands. In many circumstances, the best strategy is to retype the whole document, but this strategy is to be tempered by consideration of the size of the document and the potential typists’ skills.


Just like you can automatically reverse engineer C code (though not very readable and with certain limitations) from a compiled exe you should be able to reverse engineer the LaTeX code from a compiled PDF. There just don't seem to be any tools around that even attempt this. This would sure be an interesting thing to implement.

There's some research going on in that area: http://www.fi.muni.cz/~sojka/dml-2011-baker-sexton-sorge.pdf


The Latex file will have been printed to PDF, converting the contents into Postcript commands.

0

精彩评论

暂无评论...
验证码 换一张
取 消