Re: [xwiki-users] styling PDF and ODT export

2011-12-28 Thread petskratt
Problem with pdf.css not working was a bug
http://jira.xwiki.org/browse/XWIKI-7328 that got fixed, thanks!

And - this definitely works also on RTF and ODF exports.

Answering my own question about inspecting contents of created XHTML file
(to be able to style it) - turn on logging
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Logging and set
com.xpn.xwiki level to debug, look for message with Final XHTML for export
(or after applyCSS - HTML with CSS applied).

cheers,
-peeter

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/styling-PDF-and-ODT-export-tp7116069p7132269.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] styling PDF and ODT export

2011-12-22 Thread Marius Dumitru Florea
On Wed, Dec 21, 2011 at 7:56 PM, petskratt p...@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#HCustomizingthePDFexportLook26Feel
 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/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/export/OfficeExporter.java#L96
[2] 
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/officeExport.xsl


 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-tp7116069p7116069.html
 Sent from the XWiki- Users mailing list archive at Nabble.com.
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] styling PDF and ODT export

2011-12-22 Thread petskratt
thanks, Marius. still - 

* is there a simple way to investigate the generated XHTML - some debugging
setting that keeps temporary files?

* is there a reason why my h1, h2, h2 {color: red;} test with pdf.css didn't
work? (if it is just overridden by xslt then the lookfeel instruction needs
a better sample; or could it be this functionality is broken in 3.3? tried
with clean install on OSX, no luck)

--
View this message in context: 
http://xwiki.475771.n2.nabble.com/styling-PDF-and-ODT-export-tp7116069p7117934.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


[xwiki-users] styling PDF and ODT export

2011-12-21 Thread petskratt
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#HCustomizingthePDFexportLook26Feel
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.

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-tp7116069p7116069.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users