In article <41432ed1$0$317$ XXXX@XXXXX.COM >,
The PDF file format is documented in "Portable Document Format Reference
Manual", published by Addison-Wesley, ISBN 0-201-62628-4, $24.95
and that document refers to the "Postcript Language Reference Manual",
published by Addison-Wesley, ISBN 0-201-18127-4, $31.95
It is just a file, you can write it with ordinary file output
primitives, such as putc() or FSWrite().
A PDF file is basicly a wrapper for a subset of Postscript.
To translate Quickdraw drawing to appropriate Postscript commands, you
install Quickdraw bottleneck callbacks, then draw your LView.
I did something similar 10 years ago: when porting a Mac program to Sun
Unix, I used an abstract class tp define an interface, with three
implementations: one called Quickdraw, (only compiled in the Macintosh
version), one called X11 drawing calls (only compiled on Sun), and the
third generated a postscript command text string equivalent.
If you draw your LView into an LGWorld, then you can create a
QuicktimeGraphicExporter using that GWorld and export using the
kQTFileTypePDF component. This will give you a pixmap in a PDF.
(Although, in one program I wrote, that gets the canonical list of
Graphic Exporters from Quicktime, PDF is not listed.)
In Core Graphics, you can create an output file using
CGPDFContextCreateWithURL(), then anything you draw into the returned
CGContextRef will be written as PDF to the output. (Naturally, this is
OS X only.) The Core Graphics framework is in the Application Services