CGPDF - Setting /Rotation
CGPDF - Setting /Rotation
- Subject: CGPDF - Setting /Rotation
- From: Pedro Cuenca <email@hidden>
- Date: Mon, 11 Aug 2008 00:02:08 +0200
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