[texhax] Pdf to LaTeX

Torsten Wagner torsten.wagner at fh-aachen.de
Tue May 27 14:50:48 CEST 2008

Hi Peter,

>  Dear Sir/Madam,
>  I have a pdf file that was originally created from a LaTeX file which I
> have lost. Is there any way to convert a pdf file back into a LaTeX file?
> Thanks

I'm sorry to tell you but this is not possible. In the PDF you will not find a 
single line of LaTeX command in the same manner as you would not find a 
single line source code in a .exe file.
Reverse Engineering it the only thing you can do.
You might like to try to save the PDF-file as RTF and try to convert this back 
to LaTeX. But I guess a lot of format styles will be lost and you have to 
make your hands dirty to correct all this. The problem is that all this 
parsers try to set 1:1 the layout by using as much LaTeX code as possible. 
You will find unreadable amounts of LaTeX command for just a single detail of 
the preferred layout.

>From my experience in is a lot of easier to just transfer the plain text and 
to do all this format stuff again. This is much more quicker as you might 
aspect and you will not have to fiddle around with plenty conversion 

Thus my way would be
 PDF -> pure TXT -> coffee -> hand made layouting -> coffee -> LaTeX -> Smile
                                     |                                                                 |



More information about the texhax mailing list