[pdftex] Re: pdftosrc

Thierry Bouche Thierry.Bouche at ujf-grenoble.fr
Fri Dec 15 17:02:49 CET 2000


i found thanh's message in the archive (stupid me)

A question, maybe also stupid: could it be possible to encapsulate any
included PDF with such code so that pdftosrc could extract the
original PDF? [I know the included PDFs are relatively incomplete...]

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

From: Han The Thanh <thanh at informatics.muni.cz> 
Date: Sat, 8 Apr 2000 21:06:28 +0200 (MET DST) 

I wrote a small utility called pdftosrc based on xpdf codes to extract a file
included in a pdf file. The syntax for including file is the same as suggested
by Heiko. Thus one can say:

\immediate\pdfobj 
    stream attr {/Type /SourceFile /SourceName (\jobname.zip)}
    file{\jobname.zip}
\pdfcatalog{/SourceObject \the\pdflastobj\space 0 R}

to include \jobname.zip or whatever. I would prefer something like

\immediate \write 18 {make mysources.tar.bz2}

to get maximal compressness.


To extract the file that has been included, one then says:

pdftosrc file.pdf

and that's it. The file is included/extracted in binary mode.



More information about the pdftex mailing list