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

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to