On Mar 31, 2005, at 5:02 AM, David Niemeijer wrote:
Hi,
I am drawing a PDF page like this:
pageRef = CGPDFDocumentGetPage(inPDFDoc, 1) ;
pageTransform = CGPDFPageGetDrawingTransform (pageRef,
kCGPDFArtBox, inRect, 0, true) ;
CGContextConcatCTM (inContext, pageTransform);
CGContextDrawPDFPage (inContext, pageRef);
What I am seeing is that the image scales as long as inRect is
smaller than the artBox of the PDF, but as soon as inRect is larger
than the artBox of the PDF no scaling occurs. So I can effectively
downscale my image to fit a smaller inRect, but not upscale it to
fit a larger inRect. This is on 10.3.8.
Am I doing something wrong? Should I use another method for
drawing? Is there something I need to do to get upscaling or is
this a bug?
For good or for ill, what you are seeing is the correct behavior.
For upscaling, the "easiest" thing to do is to scale the context
yourself before using the drawing transform.