Ghostscript documentation or reference
levipearson at gmail.com
Thu Feb 13 13:12:11 MST 2014
On Thu, Feb 13, 2014 at 9:36 AM, John Shaver <bobjohnbob at gmail.com> wrote:
> I'm pretty certain that they are not specific to the PDF specification (or
> even part of). The only time I seem them used in online scripts is when
> people are using ghostscript to process PDF files and try to pull specific
> pages or information from them.
> There is no sign of them in the postscript reference manual (
> http://www.adobe.com/products/postscript/pdfs/PLRM.pdf) or here (
> http://www.adobe.com/devnet/pdf/pdf_reference.html) and searching google
> for /site:adobe.com "runpdfbegin"/ returns no results.
Ahh, you're right. It's actually part of the source code for the PDF
interpreter. In ghostscript, the PostScript interpreter is written in
C, but the PDF interpreter is written in PostScript. See the source
file pdf_main.ps for the definition of runpdfbegin, for example. They
do have a document describing the structure of their code base, at
least at a high level: http://ghostscript.com/doc/current/Source.htm
I don't know PostScript well, so I didn't dig too deeply, but it
doesn't appear to be designed as a user-level API. I'd recommend
looking at MuPDF if you're interested in writing programs to
manipulate PDF files. Another option would be libpoppler, which
derives from xpdf.
More information about the PLUG