Hi Vincent,

thanks for your quick answer. I already tried setting the numbers by css, but that causes an "ValidationException: Invalid property encountered on "fo:block": counter-reset" (see below). Do you have another idea or more links where this is described?

_*Css:*_
body {counter-reset: section}
h2 {counter-reset: sub-section}
h3 {counter-reset: composite}
h4 {counter-reset: detail}

h2:before {
    counter-increment: section;
    content: counter(section) " ";
}

h3:before {
    counter-increment: sub-section;
    content: counter(section) "." counter(sub-section) " ";
}

h4:before {
    counter-increment: composite;
content: counter(section) "." counter(sub-section) "." counter(composite) " ";
}

h5:before {
    counter-increment: detail;
content: counter(section) "." counter(sub-section) "." counter(composite) "." counter(detail) " ";
}


*_Result:_*
Error number 11015 in 11: Exception while exporting
com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting
[...]
Caused by: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:block": counter-reset (Siehe Position 32:56529) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502) at com.xpn.xwiki.pdf.impl.PdfExportImpl.renderXSLFO(PdfExportImpl.java:357)
    ... 53 more
Caused by: org.apache.fop.fo.ValidationException: Invalid property encountered on "fo:block": counter-reset (Siehe Position 32:56529) at org.apache.fop.events.ValidationExceptionFactory.createException(ValidationExceptionFactory.java:38) at org.apache.fop.events.EventExceptionManager.throwException(EventExceptionManager.java:58) at org.apache.fop.events.DefaultEventBroadcaster$1.invoke(DefaultEventBroadcaster.java:175)
    at com.sun.proxy.$Proxy107.invalidProperty(Unknown Source)
at org.apache.fop.fo.PropertyList.handleInvalidProperty(PropertyList.java:557) at org.apache.fop.fo.PropertyList.convertAttributeToProperty(PropertyList.java:476) at org.apache.fop.fo.PropertyList.addAttributesToList(PropertyList.java:386)
    at org.apache.fop.fo.FObj.processNode(FObj.java:124)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:291)
    at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
    ... 54 more


Best regards
Alina


Am 05.06.2016 um 13:28 schrieb Vincent Massol:
Hi Alina,

On 03 Jun 2016, at 15:56, Alina Kupgisch <[email protected]> wrote:

Hi at all,

we are using the macro "numberedheadings" in our pages, which works fine. But 
on pdf export, the numbers get lost. I tried to use css for creating automatic numbers, 
but this produces an error. Is there any other opportunity to achieve an automatic 
numbering?
Disclaimer: the “numbered headings” macro is not supported by the XWiki dev 
team; it’s a contribution.

FYI the “numbered headings” macro from 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered+Headings just 
adds CSS to the pages where it’s used (see 
http://extensions.xwiki.org/xwiki/bin/view/Extension/Numbered+Headings#HImplementation).

Now the reason why you don’t see it applied to the PDF export is because of a 
current limitation: SSX objects are not applied during PDF exports see 
https://jira.xwiki.org/browse/XWIKI-13071

So the current workaround you have is to customize the CSS used for the PDF 
export and use some similar CSS than the one used in that macro:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel

Thanks
-Vincent

PS: Note to self and to xwiki devs: It would be great to have some simple to 
read tutorial on customizing the PDF export.

Thanks and best regards
Alina
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users


--
-----------------------------------
SOURCEPARK GmbH
B.Sc. Alina Kupgisch

Partner der Allianz für Cyber-Sicherheit
des Bundesamtes für Sicherheit in der
Informationstechnik (BSI)

Hohenzollerndamm 150, Gebaeude 7
14199 Berlin

Tel:    +49 (0)30/398 068 30
Fax:    +49 (0)30/398 068 39
e-mail: [email protected]
WWW:    www.sourcepark.de
-----------------------------------
SOURCEPARK GmbH
Sitz der Gesellschaft: Berlin
Handelsregister: Amtsgericht Berlin-Charlottenburg, HRB 80254
Geschäftsführer: Matthias Barmeier, Harald Dürr
-----------------------------------

Wichtiger Hinweis: Die vorgenannten Angaben werden jeder
E-Mail automatisch hinzugefügt und lassen keine Rückschlüsse
auf den Rechtscharakter der E-Mail zu.

Diese E-Mail kann vertrauliche und/oder rechtlich geschützte
Informationen enthalten. Wenn Sie nicht der richtige Adressat
sind oder diese E-Mail irrtümlich erhalten haben, informieren
Sie bitte sofort den Absender und vernichten Sie diese E-Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe
dieser E-Mail ist nicht gestattet.

_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to