Re: Generating PDF images (+followup question)
Re: Generating PDF images (+followup question)
- Subject: Re: Generating PDF images (+followup question)
- From: Graham Cox <email@hidden>
- Date: Fri, 28 May 2010 16:36:55 +1000
On 28/05/2010, at 4:17 PM, Ken Ferry wrote:
> Did you read the explanation of flipped contexts vs flipped images, and how to draw an image right side up into a flipped context?
>
> Flipped contexts are not deprecated.
I understand that contexts can (still) be flipped.
Let's break this down a bit, since I'm fighting two problems simultaneously here. First, PDF File generation.
Using the code I quoted, I generate PDF data in a flipped context. The flipped context matches the coordinate system that drawn objects expect. As such, objects and text are all positioned in the correct relative locations.
If I write the PDF data immediately to a file, no NSImage or rep involved, result is an upside down PDF file when it's opened in Preview.
If I generate the PDF data in a non-flipped context, the PDF File is still upside down, with the added problem that text glyphs are inverted individually.
So at no point have I done anything with this image like draw it anywhere. How can it even be possible for PDF data in a file to be inverted? The problem appears to be with the PDF generation, so what's wrong there?
> Do you have or can you obtain access to the 2007 WWDC videos? :-)
>
Not sure - will try to find them. So far a search on ADC brings up just one result and it's in Japanese...
--Graham
_______________________________________________
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