[pdftex] How to covert pdf file into latex file?

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Thu Jul 13 12:16:40 CEST 2006

jonathan d p ferguson writes:

> On Jul 12, 2006, at 7:36 PM, Reinhard Kotucha wrote:
> >>>>>> "John" == John R Culleton <john at wexfordpress.com> writes:
> >> And I know of no one who has even attempted this kind of reverse
> >> engineering on a pdf file.
> >
> > Why do you want to reverse engineer anything while it is very well
> > documented?
> >
> AFAIK, while the PDF standard is well documented, in order to turn it  
> back into a source format, one would need to know first the stream- 
> markup of an InDesign, Quark, Illustrator, or pdfeTeX file, and  
> second, the source format codes explicitly stored in the PDF. For  
> example, when one saves an Illustrator file as PDF, one can check  
> "Preserve Illustrator editing capability" for the PDF file. Doing so  
> encapsulates the Illustrator file in the PDF file as a stream (or set  
> of streams).
> This leads to a curious question:
> Could one tell pdfeTeX to encapsulate the *TeX source? If so, how?

i don't see why not (see the attachfile [latex] package).

>  From the pdfTeX documentation (pdftex-a.pdf) and some simple  
> sleuthing about with Illustrator PDF saves,
> I see that the way to encapsulate would be some invocation of
> \pdfobj [object type spec]
> 	I suppose using the "file" attr against the *TeX source file(s), say  
> "\pdfobj [file] Source.tex"?
> 	Can anyone provide a verbatim example of how to do this? I'm not  
> having great luck with it.
> However, supposing one were to put the *TeX sources into a PDF  
> stream, how would one extract that stream back into human-readable  
> form? Can pdfeTeX do it (I doubt it, but I thought I'd ask)?

however, this presumes foresight.  "i know i'm going to lose this
source, so i'll make an extra copy in the pdf".  doesn't seem a
particularly efficient way of ensuring you've still got a copy (i'm a
believer in backup procedures, myself).

what's more, nothing said so far (beyond "make plain text and re-mark
it up") seems actually to have offered the op any sort of help.


More information about the pdftex mailing list