Vincent Massol wrote:
On Jun 26, 2008, at 1:58 AM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2008-06-26 01:58:47 +0200 (Thu, 26 Jun 2008)
> New Revision: 10823
>
> Modified:
> xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
> pdf/impl/PdfExportImpl.java
> Log:
> XWIKI-2498: Exporting a page with an image to PDF fails on Jetty
> Fixed.
Shouldn't this be done in the rendering engine
code?
For example in the new rendering we don't need this so it would be
easier to integrate the new rendering if this code was only found in
the old rendering code.
Yes, that works most of the times, but fails when using #include*, because the included
content will
be rendered twice. Initially I wrote the placeholder code only in the XWikiRadeoxRenderer,
but it
wasn't working for this case. So I moved it in Utils#parseTemplate, but then it
wouldn't be called
at all when not using the normal way of rendering pages, for example when exporting or
when
accessing documents from other places. So I also added a local placeholder mechanism in
the
renderer. Still, the #include problem is still there, since using #include will get the
rendered
content of the included document while the original document is still in the parsing
stage. I could
move the code from the PDF export to the velocity renderer, but that's not a real
solution. It's the
fault of the current way of rendering, and, as you said, the new rendering component
solves this issue.
If you have a better solution...
--
Sergiu Dumitriu
http://purl.org/net/sergiu/