[Erp5-report] r12924 - /erp5/trunk/products/ERP5/Document/PDFDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 20 18:54:30 CET 2007
Author: bartek
Date: Tue Feb 20 18:54:28 2007
New Revision: 12924
URL: http://svn.erp5.org?rev=12924&view=rev
Log:
return original format if no format specified
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=12924&r1=12923&r2=12924&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/PDFDocument.py (original)
+++ erp5/trunk/products/ERP5/Document/PDFDocument.py Tue Feb 20 18:54:28 2007
@@ -68,12 +68,15 @@
)
- def index_html(self, REQUEST, RESPONSE, format, force=0):
+ def index_html(self, REQUEST, RESPONSE, format=None, force=0):
"""
Returns data in the appropriate format (graphical)
it is always a zip because multi-page pdfs are converted into a zip
file of many images
"""
+ if format is None:
+ RESPONSE.setHeader('Content-Type', 'application/pdf')
+ return self._unpackData(self.data)
if format == 'html':
RESPONSE.setHeader('Content-Type', 'text/html;charset=UTF-8')
return self.getHtmlRepresentation(force)
More information about the Erp5-report
mailing list