Hello,
I customized PDF export with this way:
I attached xhtml2fo.xsl and use$xwiki.getDocument(‘MyApp.PDFTemplate’).getAttachment(‘xhtml2fo-myapp.xsl’).contentAsString like Anca said: Loading...
PDF export use my PDFTemplate if I use URL: http://yourserver/xwiki/bin/export/XWiki/PDFTemplate?format=pdf&pdftemplate=XWiki.PDFTemplate but I want that all my PDF export use my PDFTemplate.
For this I edited ./templates/pdf.vm file :
#template("xwikivars.vm")
#if ($request.pdftemplate)
#set ($pdfdoc = $xwiki.getDocument($request.pdftemplate))
#else
## set($pdfdoc = $tdoc)
#set ($pdfdoc = $xwiki.getDocument("XWiki.PDFTemplate"))
#end
but it doesn’t work (on xwiki 8.4.4 version)
Any ideas?
(BTW it will be great if we could use xhtml2fo.xsl in filesytem like pdf.css file)
Thxs
./templates/pdf.vm
Pascal B