Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know that probably no information is passed to the PDF when a .tex file is compiled, but is there a tool that can convert a PDF document to (La)TeX?

share|improve this question
The answer is going to be 'no', more or less, but it would be helpful to say a little more about the nature of your PDF files and desired LaTeX output. For example, converting simple text is a different issue to converting maths or graphics. –  Joseph Wright Jan 8 '11 at 15:06
you can convert to doc (nitroreader.com) and then with word2tex (chikrii.com) to LaTeX. But the code maybe lousy ... –  Herbert Jan 8 '11 at 15:20
Decide what information you're hoping to preserve. Google for information on conversion to intermediate formats such as text or html that might preserve that information. –  Ben Crowell Feb 18 '13 at 4:35
add comment

3 Answers

up vote 16 down vote accepted

If you install AbiWord with the additional import and export plugins,* you can open a PDF file in the Word Processor, and then export to LaTeX. In fact, you can also convert from the commandline:

abiword --to=tex filename.pdf

Be warned that both its PDF import routine and its LaTeX export routine have serious limitations, and you should not expect anything that will useable without serious tweaking afterwards.

(* IIRC, the extra plugins are installed by selecting a custom install on Windows and checking all the import and explort options it gives you. For Linux, you typically need to install a separate package called "abiword-plugins" or "abiword-plugin-mathview" depending on distro. No clue for Mac.)

Inkscape can open PDFs and export to either PSTricks or TikZ codes; this might be useful if the PDF in question is just a diagram or vector image you want to edit.

There's a project listed on sourceforge called pdf2latex, but it doesn't look like any real work has been done on it. I'm not sure it's a real project. (The page looks fishy; almost as if someone was just posting an idea.)

share|improve this answer
Thanks! Unfortunately abiword outputs: AbiWord: could not open the file [filename]. –  MartyIX Jan 9 '11 at 14:50
Is the PDF import plugin installed? Can you open other PDFs? If so, and it still doesn't work for the one you want, it's probably too complex a PDF for it. –  frabjous Jan 9 '11 at 15:09
from abisource.org/wiki/FaqCreatingPDFs Can I use the PDF plugin mentioned on the PluginMatrix page? No, this plugin hasnt been maintained in many years and doesnt ship with newer versions of AbiWord . Seems to be an export plugin, though. I cannot find an input plugin. Windows here. –  naxa Jan 29 '13 at 11:16
A thread lists a possible candidate for "pdf import" plugin, based on poppler, by Jauco, but the site is offline, the web archive didn't take a good snapshot and it seems it didn't compile on windows: mobileread.com/forums/showthread.php?t=7509 –  naxa Jan 29 '13 at 11:29
add comment

Check out InftyReader.

Quoting the start page:

InftyReader is an Optical Character Recognition (OCR) application that recognizes and translates scientific documents (including math symbols) into LaTeX, MathML and XHTML!

share|improve this answer
Eunice, your answer was a bit … simple. Hope you don’t mind my adding of some more information. But nonetheless I don’t want to forget the following: Welcome to TeX.sx! –  Speravir Sep 28 '12 at 2:14
note, the trial version only allows 1 page to be converted at a time. Also you can only use it 5 times per DAY! Still, an incredible solution that really, really works! –  ecoe Dec 5 '13 at 6:50
add comment

Import the file using LibreOffice. It will create a Draw file. You have to copy and edit it by pieces into Writer. Then you can use the plugin writer2latex to export the results to LaTeX. The final code is dirty, with plenty of stuff you don't need and some errors.

If your docs are large enough, this process might be easier than re-typing everything.

Another alternative, if you are dealing mostly with pure and simple text, is to save the file as a *.txt from the PDF reader. Then copy/paste the thing into your LaTeX editor.

share|improve this answer
Both of these approaches will break ligatures unfortunately - the only solution I've found is a lot of find&replace. –  Chris H Jul 29 '13 at 10:21
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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