[pdftex] Re: pdftosrc

alou at mazars.es alou at mazars.es
Fri Dec 15 18:22:58 CET 2000

Hi again

Using hyperef you can do something like (at least under Win32 --- it seems
to me that this doesn't work in unix)


to extract all the files included in \jobname.pdf. However, it would be
nice if the pdftosrc program could be called without any external links. I
suppose this can not be done in JavaScript for security reasons...


Thierry Bouche <Thierry.Bouche at ujf-grenoble.fr> on 15/12/2000 17.02.49

To:   pdftex at tug.org
cc:    (bcc: Antonio Lou/BCN/Consult/GMTR)

Subject:  Re: pdftosrc

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
included in a pdf file. The syntax for including file is the same as
by Heiko. Thus one can say:

    stream attr {/Type /SourceFile /SourceName (\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