Generating a PDF file without a NSView
Generating a PDF file without a NSView
- Subject: Generating a PDF file without a NSView
- From: David Adalsteinsson <email@hidden>
- Date: Fri, 16 Nov 2001 00:42:34 -0500
How can I create a PDF file (and EPS) without drawing it inside a
drawRect in NSView and then
using "dataWithPDFInsideRect/dataWithEPSInsideRect" on the view.
I would like to be able to do something like:
Create an empty NSPDFImageRep/NSEPSImageRep
Connect it to a NSImage
draw into the NSImage using standard drawing command (lockFocus, ....,
unlockFocus)
extract the representation with NSPDFImageRep/NSEPSImageRep
Is this in the right direction? If so, what is the exact syntax for
lines 1 & 2.
Should I do this entirely differently.
Any help appreciated.
David