[Pythonmac-SIG] Python CoreGraphics script running in Applescript

Bill Noon noon at snow.nrcc.cornell.edu
Fri Jan 30 21:56:45 CET 2009


On Jan 30, 2009, at 3:24 PM, Jim Skibbie wrote:
...
> page_rect = pdf.getMediaBox( page_number )
> page_width = int(page_rect.getWidth())
> page_height = int(page_rect.getHeight())
>
> print "%d \r\n%d" % (page_width, page_height)
>
>
> Under OS 10.5, this script now uses a deprecated function of  
> CoreGraphics and I get an error that says:
>
>
>> <Error>: The function `CGPDFDocumentGetMediaBox' is obsolete and  
>> will be removed in an upcoming update. Unfortunately, this  
>> application, or a library it uses, is using this obsolete  
>> function, and is thereby contributing to an overall degradation of  
>> system performance. Please use `CGPDFPageGetBoxRect' instead.
>
>
> Can anyone steer me in the right direction on how to work with the  
> CGPDFPageGetBoxRect function?
>
> Thanks.
> Jim

Jim -- Try the following:
	page_rect = pdf.getPage(page_number).getBoxRect(page_number)

--Bill Noon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090130/d4284e6a/attachment.htm>


More information about the Pythonmac-SIG mailing list