table of contents
other versions
- wheezy 2012.20120628-4
- jessie 2014.20140926.35254-6
- testing 2016.20160513.41080.dfsg-2
- unstable 2016.20160513.41080.dfsg-2
- experimental 2017.20170613.44572-1
pdftosrc(1) | General Commands Manual | pdftosrc(1) |
NAME¶
pdftosrc - extract source file or stream from PDF fileSYNOPSIS¶
pdftosrc PDF-file [stream-object-number]DESCRIPTION¶
If only PDF-file is given as argument, pdftosrc extracts the embedded source file from the first found stream object with /Type /SourceFile within the PDF-file and writes it to a file with the name /SourceName as defined in that PDF stream object (see application example below).OPTIONS¶
None.FILES¶
Just the executable pdftosrc.ENVIRONMENT¶
None.DIAGNOSTICS¶
At success the exit code of pdftosrc is 0, else 1.pdftosrc version 3.01
When pdftosrc was successful with the output file writing, one of the
following messages will be issued:
Source file extracted to
source-file-name
or
Stream object extracted to
PDF-file.stream-object-number
or
Cross-reference table extracted to
PDF-file.xref
Not a Stream object
When the PDF-file can't be opened, the error message is:
Error: Couldn't open file 'PDF-file'.
When pdftosrc encounters an invalid PDF file, the error message (several
lines) is:
Error: May not be a PDF file (continuing
anyway)
(more lines)
Invalid PDF file
There are also more error messages from pdftosrc for various kinds of
broken PDF files.
NOTES¶
An embedded source file will be written out unchanged, i. e. it will not be uncompressed in this process.EXAMPLES¶
When using pdftex, a source file can be embedded into some PDF-file by using pdftex primitives, as illustrated by the following example:stream attr {/Type /SourceFile /SourceName (myfile.zip)}
file{myfile.zip} \pdfcatalog{/SourceObject \the\pdflastobj\space 0 R}
BUGS¶
Not all embedded source files will be extracted, only the first found one.SEE ALSO¶
xpdf(1), pdfimages(1), pdftotext(1), pdftex(1),AUTHORS¶
pdftosrc written by Han The Thanh, using xpdf functionality from Derek Noonburg.COPYRIGHT¶
Copyright (c) 1996-2006 Han The Thanh, <thanh@pdftex.org>23 December 2006 | User Manuals |