On Wed, Dec 21, 2011 at 7:56 PM, petskratt <pets(a)tehnokratt.net> wrote:
I have been trying to apply styles to PDF (and
hopefully also ODT) export
according to instructions in
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomiz…
but...
(1) adding CSS (either as pdf.css or via PDFClass & PDFTemplate method) that
contains simple test (h1, h2, h3 {color: red;}) does not work (tested on XE
3.3 release)
(2) at the same time, changing xhtmlxsl (either by adding to PDFTemplate or
WEB-INF/classes) works nicely
Q1: Should it work with CSS?
The abovementioned instruction expects this method to work also with RTF
export - and as the ODT export is based on PDF export I hoped to be able to
style also ODT... but even when change is working in PDF headings remain
black in RTF and ODT export... as these XSL transforms seemt to be related
to FOP used for PDF generation.
OfficeExporter [1] extends PDF exporter and overwrites only one
method, the one that converts the final XHTML to the output format and
writes the result to the provided output stream (response output
stream). So instead of applying xhtml2fo.xsl and fop.xsl the office
exporter applies only officeExport.xsl [2] and converts the result to
the specified office format using the office server.
Afaics from the code the (custom) CSS is applied before this method
(exportXHTML) is called, so the office exporter gets the same styled
XHTML as the PDF exporter.
Hope this helps,
Marius
[1]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
[2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwi…
Q2: How to style ODT export? Also with pdf.css (that doesn't currently
work), somehow modifying default template used by OpenOffice or somehow with
OpenOffice.xsl?
--
View this message in context:
http://xwiki.475771.n2.nabble.com/styling-PDF-and-ODT-export-tp7116069p7116…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users