Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing to a PDF Context



Dear all,

I am trying to do a very simple thing but I am stuck.

I have loaded a PDF and I have a CGPDFDocumentRef.
Now I want to draw a rectangle on a page of this document.

I start with creating a graphic context to draw to.

The CGPDFContextCreate requires a CGDataConsumerRef.

I suppose that I have to create such a consumer by using CGDataConsumerCreateWithCFData because the CGDataConsumerCreate requires that I provide callbacks to put bytes and, obviously, I don't know how to do it in the PDF format.

So now I need a CFMutableDataRef representing the PDF page and pass it to CGDataConsumerCreateWithCFData.

And here I am stuck... How do I retrieve a CFMutableDataRef from a CGPDFPageRef for creating a data consumer?

Thank you,
Fabio
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.