• 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: How to set the media box for a CGPDFPageRef?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set the media box for a CGPDFPageRef?


  • Subject: Re: How to set the media box for a CGPDFPageRef?
  • From: DairyKnight <email@hidden>
  • Date: Sun, 20 Sep 2009 12:24:21 +0800

OK. I'm using PDFKit now. Thanks for your advice.


On Thu, Sep 10, 2009 at 4:04 AM, David Duncan <email@hidden>wrote:

> On Sep 8, 2009, at 8:07 PM, DairyKnight wrote:
>
>  I'm trying to convert my program with PDFKit to CGPDF to get better
>> performance. I'm trying to crop a page, with PDFPage I can simply do:
>> [PDFPage setBounds: forBox:kPDFDisplayMediaBox];
>>
>> But for CGPDFPageRef, there seems to be only a CGPDFPageGetBoxRect
>> available. I wonder if I can simply change the mediabox with a function?
>>
>
>
> CGPDFDocumentRef (and associated data types) are read-only. If you need to
> change something about a PDF, you need to create a CGPDFContext and draw the
> old PDF into the new one. This is one of many details that PDFKit hides from
> you, so I would likely try to solve your issues with PDFKit rather than
> rewriting your code to use CG directly.
> --
> David Duncan
> Apple DTS Animation and Printing
>
>
_______________________________________________

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: 
 >How to set the media box for a CGPDFPageRef? (From: DairyKnight <email@hidden>)
 >Re: How to set the media box for a CGPDFPageRef? (From: David Duncan <email@hidden>)

  • Prev by Date: kAELogOut and no dialog
  • Next by Date: Re: How to determine if a PDFPage is image based? (A scanned page)
  • Previous by thread: Re: How to set the media box for a CGPDFPageRef?
  • Next by thread: NSArray EXEC_BAD_ACCESS when initalized with strings
  • Index(es):
    • Date
    • Thread