Skip navigation.
 
mlRe: Scaling CGPDFPageRefs
FROM : John Calhoun
DATE : Thu Jan 24 23:47:55 2008

On Jan 24, 2008, at 8:15 AM, Maryanna Rogers wrote:
> I've tried things like the following, with no luck:
>
> CGPDFPageRef page = CGPDFDocumentGetPage(doc, 1);
> CGAffineTransform m = CGPDFPageGetDrawingTransform (page,
> kCGPDFMediaBox, CGRectMake(0, 0, 50, 50), 0, true);
> CGContextConcatCTM (myPDFContext, m);
> CGContextClipToRect (myPDFContext, CGRectMake(0, 0, 4, 4));
>
> CGContextDrawPDFPage(myBitmapContext, page);


That looks close.  When you say "no luck" what do you mean?  No pixels?

On Jan 24, 2008, at 9:48 AM, David Duncan wrote:
> Do what you would do for any other content you wanted to scale, just 
> add an additional scaling transform. For example, if you wanted to 
> scale to 200%, you would also call "CGContextScaleCTM(context, 2.0, 
> 2.0)" before you draw the image.


I think call to CGPDFPageGetDrawingTransform() takes care of the scale 
since a destination rectangle is passed in.

John Calhoun—_______________________________________________

Cocoa-dev mailing list (<email_removed>)

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:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>

This email sent to <email_removed>

Related mailsAuthorDate
mlScaling CGPDFPageRefs Maryanna Rogers Jan 24, 17:15
mlRe: Scaling CGPDFPageRefs David Duncan Jan 24, 18:48
mlRe: Scaling CGPDFPageRefs John Calhoun Jan 24, 23:47
mlRe: Scaling CGPDFPageRefs David Duncan Jan 25, 00:40