PDF Export: Child images don't get exported (includechilds=x)

Hi all

I need to export a page with several childs into a PDF. I tried both the manual way, adding “includechilds=2” to the URL and the panel way, both with the same result: The images don’t get exported at all.

The page (ending in /WebHome/) itself doesn’t contain any image, but the childs do. Exporting the child pages one by one works perfeclty fine.

Any idea what could be wrong here?

– update –

I noticed that adding the pages manually using the “pages=…” param shows the same result, no images.

– another update –

It looks like the child’s images are linked wrongly. I turned on debugging and found this:


instead of


Thanks in advance


Ok, found a workaround. I’m creating one page with many includes:

{{include reference=“xx.yy.zz” context=“NEW”/}}

The context needs to be there, otherwise the images don’t get displayed too.

You should check the display macro too (http://extensions.xwiki.org/xwiki/bin/view/Extension/Display%20Macro).

As you can see on http://extensions.xwiki.org/xwiki/bin/view/Extension/Include%20Macro the context parameter has been deprecated for some time now.

Hi Vincent

Thanks for the hint. I replaced include by display now, that looks good.

Any idea why the image paths aren’t correct when I export childs?

No idea ATM, I’d need to dig into it but I don’t have the time right now. Maybe someone else knows in the meantime.

What I can tell is that the code starts here: xwiki-platform/xwiki-platform-core/xwiki-platform-web/src/main/webapp/templates/pdf.vm at ee741469c25dc5e9a1695dd9be81ea7eba0182e4 · xwiki/xwiki-platform · GitHub