Is there a package which converts PDF to LaTeX? I have the PDFs created using TeX but I have lost the original .tex file.

Can I retrieve the TeX back from PDF?

closed as off-topic by N0rbert, Kevin Bowen, Eric Carvalho, Amith KK, user535733 Jul 13 '18 at 14:00

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – N0rbert, Kevin Bowen, Eric Carvalho, Amith KK, user535733
If this question can be reworded to fit the rules in the help center, please edit the question.


No, that's not possible. Most of the information used to generate the PDF is lost during its creation and only the result is retained (unless you told the TeX processor to attach the source files to the result document).


On the tex stackexchange page you can find this discussion.

A short answer to your question: No.

But there are some tools which can help you to make a tex from a pdf.

  • Use the writer2latex plugin in LibreOffice

  • The command line version can be found on the Writer2Latex page.

  • If you have a lots of mathematics in it, try InftyReader.

  • If you have a pure text document you can simply convert the text to a *.txtfile by

    pdftotext myDocument.pdf MyDocument.txt

    and make a new latex document from it.

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