Re: Unable to generate a PDF from textual data
Re: Unable to generate a PDF from textual data
- Subject: Re: Unable to generate a PDF from textual data
- From: David Duncan <email@hidden>
- Date: Fri, 14 Nov 2008 11:05:12 -0800
On Nov 14, 2008, at 10:16 AM, Lee, Frederick (Ric) wrote:
CFDataRef faxMsgData = (CFDataRef)[[self.faxHistoryItemDict
objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding];
This is not PDF data, this is just text.
CGPDFDocumentCreateWithProvider() expects valid PDF data to be pulled
from the data provider (and thus from the data object your passing).
If you need to create PDF data, then you will need to use PDFKit or
Core Graphics to create valid PDF data by drawing the text strings
into a pdf context. Then you can get PDF data to do additional work
with (including creating a CGPDFDocument with the PDF data in it).
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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:
This email sent to email@hidden