Thanks from a neophyte.
Yes...
I had hoped that I could 'magically' create a PDF from a text string.
I noticed that you can select 'text' from a PDF document.  I thought you
could likewise create a PDF from text (NSString).

BTW: My client wanted to render text as a PDF on his iPhone.

Ric.

-----Original Message-----
From: David Duncan [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 14, 2008 1:05 PM
To: Lee, Frederick (Ric)
Cc: [email protected]
Subject: Re: Unable to generate a PDF from textual data

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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to