diff -r 3084bc9ccc64 -r b415bca9a9ed web/views/basetemplates.py --- a/web/views/basetemplates.py Wed Sep 02 10:22:47 2009 +0200 +++ b/web/views/basetemplates.py Wed Sep 02 10:24:15 2009 +0200 @@ -270,7 +270,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' @@ -279,7 +279,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 @@ -287,7 +288,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()