Ghostscript documentation or reference

Levi Pearson levipearson at
Thu Feb 13 13:12:11 MST 2014

On Thu, Feb 13, 2014 at 9:36 AM, John Shaver <bobjohnbob at> 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 (
> or here (
> and searching google
> for / "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 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:

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 mailing list