• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CGPDF - Setting /Rotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CGPDF - Setting /Rotation
      • From: "Ken Ferry" <email@hidden>
  • Prev by Date: Re: including a cocoa bundle in a carbon app
  • Next by Date: Re: including a cocoa bundle in a carbon app
  • Previous by thread: Re: Hillegass' chapter #11: Core Data
  • Next by thread: Re: CGPDF - Setting /Rotation
  • Index(es):
    • Date
    • Thread