On Fri, Nov 14, 2008 at 1:16 PM, Lee, Frederick (Ric) <[EMAIL PROTECTED]> wrote: > Greetings: > > I'm trying to create a PDF from a NSString; but I'm not getting anything. > > What am I doing wrong?
Are you thinking that your code will build a PDF which contains a visual representation of the text contained in the NSString? If so, this isn't right, it's barely even wrong. CGPDFDocumentCreateWithProvider expects raw PDF data. In other words, it expects you to already have a PDF from somewhere, and all it does is read that PDF into memory so you can work with it. It's not going to magically realize that you're giving it human-readable text, perform rendering and layout on that text, and produce a PDF document from it. If your goal is to create a new PDF which visually contains a string, your best approach is probably to put that string into an NSTextView, and then use the Cocoa printing system to generate a PDF from it. Mike _______________________________________________ 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]
