diff -r c1a4fbf2539a -r 32c2b6a34ab2 web/views/basetemplates.py --- a/web/views/basetemplates.py Tue Sep 01 18:44:17 2009 +0200 +++ b/web/views/basetemplates.py Tue Sep 01 18:45:50 2009 +0200 @@ -271,7 +271,7 @@ from subprocess import Popen as sub from StringIO import StringIO from tempfile import NamedTemporaryFile - from cubicweb.web.xhtml2fo import ReportTransformer + from cubicweb.ext.xhtml2fo import ReportTransformer class PdfMainTemplate(TheMainTemplate): id = 'pdf-main-template' @@ -280,7 +280,8 @@ """build the standard view, then when it's all done, convert xhtml to pdf """ super(PdfMainTemplate, self).call(view) - pdf = self.to_pdf(self._stream) + section = self.req.form.pop('section', 'contentmain') + pdf = self.to_pdf(self._stream, section) self.req.set_content_type('application/pdf', filename='report.pdf') self.binary = True self.w = None @@ -288,7 +289,7 @@ # pylint needs help self.w(pdf) - def to_pdf(self, stream, section='contentmain'): + def to_pdf(self, stream, section): # XXX see ticket/345282 stream = stream.getvalue().replace(' ', ' ').encode('utf-8') xmltree = ElementTree()