• 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
Re: CGPDF - Setting /Rotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >CGPDF - Setting /Rotation (From: Pedro Cuenca <email@hidden>)

  • Prev by Date: Re: CGImage failed to write Exif Auxiliary metadata to image
  • Next by Date: Cocoa and SOAP without WebServicesCore
  • Previous by thread: CGPDF - Setting /Rotation
  • Next by thread: Hiding the disclosure triangle of a specific group item in a bound NSOutlineView
  • Index(es):
    • Date
    • Thread