[Erp5-report] r37102 ivan - /erp5/trunk/products/ERP5/Document/PDFDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jul 14 08:41:58 CEST 2010
Author: ivan
Date: Wed Jul 14 08:41:56 2010
New Revision: 37102
URL: http://svn.erp5.org?rev=37102&view=rev
Log:
when converting to image from PDF we care for first page only this will make sure that only first page is used and not whole content of PDF file read & converted which is a performance issue.
Modified:
erp5/trunk/products/ERP5/Document/PDFDocument.py
Modified: erp5/trunk/products/ERP5/Document/PDFDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/PDFDocument.py?rev=37102&r1=37101&r2=37102&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PDFDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/PDFDocument.py [utf8] Wed Jul 14 08:41:56 2010
@@ -90,6 +90,11 @@ class PDFDocument(Image):
elif format is None:
return self.getContentType(), self.getData()
else:
+ if kw.get('frame', None) is None:
+ # when converting to image from PDF we care for first page only
+ # this will make sure that only first page is used and not whole content of
+ # PDF file read & converted which is a performance issue
+ kw['frame'] = 0
return Image._convert(self, format, **kw)
security.declareProtected(Permissions.ModifyPortalContent, 'populateContent')
More information about the Erp5-report
mailing list