> On 30 Jun 2016, at 18:53, Alina Kupgisch <[email protected]> wrote: > > 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?
The only link that comes to mind is https://xmlgraphics.apache.org/fop/compliance.html which mentions which fo properties are supported by FOP which is the lib we use. Thanks -Vincent > _*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
