Re: CGPDF - Setting /Rotation
Re: CGPDF - Setting /Rotation
- Subject: Re: CGPDF - Setting /Rotation
- From: "Ken Ferry" <email@hidden>
- Date: Tue, 12 Aug 2008 13:23:10 -0700
Hi Pedro,
Though people on this list will answer quartz questions if they know
the answers, this is pretty deep CG. You may have better luck on the
CoreGraphics list.
<http://lists.apple.com/mailman/listinfo/quartz-dev>
-Ken
On Sun, Aug 10, 2008 at 3:02 PM, Pedro Cuenca <email@hidden> wrote:
> Hello,
>
> I have some code that generates PDF data, and I would need to set the
> /Rotation entry of some of the pages. The following code correctly sets the
> /MediaBox entry to the rectangle specified in the page dictionary:
>
> CGRect mediaBox = CGRectMake( 0.0, 0.0, 1024.0, 768.0 );
> NSDictionary * pageInfo =
> [
> NSDictionary dictionaryWithObjectsAndKeys:
> [NSData dataWithBytes: &mediaBox length: sizeof(mediaBox)],
> kCGPDFContextMediaBox,
> nil
> ];
> CGPDFContextBeginPage( pdfContext, (CFDictionaryRef) pageInfo );
>
> However, any attempt to set the @"Rotation" dictionary key seems to be
> ignored. I have tried using different types (NSNumber, NSString, NSData) for
> the value with the same unsuccessful result.
>
> I couldn't find detailed documentation or sample code about
> CGPDFContextBeginPage(), although the documentation states it is preferred
> to CGContextBeginPage() since 10.4.
>
> Is there anything I am missing, or is simply the Rotation key silently
> ignored? If so, can you hint towards any direction I could explore to
> generate this value in my PDF output?
>
> Thanks,
>
> --
> Pedro
> _______________________________________________
>
> 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
>
_______________________________________________
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