hey when i try to convert a docx to pdf i get the exception you see at the bottom, the failure comes from:
Caused by: org.apache.fop.fo.pagination.PageProductionException: No simple-page-master matching "s1-default" in page-sequence-master "fo:repeatable-page-master-alternatives". (See position 1:1258)
i think. So how can i convert the docx that it can be processed since it is a simple 2 page template that used to have 4 pages. I tried converting to doc and then back to docx hoping that it sets a new page formatting and thus fixing the error but i had no luck with that.
thanks, Xtroce
org.docx4j.openpackaging.exceptions.Docx4JException: Exception exporting package
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:97)
at org.docx4j.Docx4J.toFO(Docx4J.java:475)
at org.docx4j.convert.out.fo.FOPAreaTreeHelper.getAreaTreeViaFOP(FOPAreaTreeHelper.java:180)
at org.docx4j.convert.out.fo.LayoutMasterSetBuilder.fixExtents(LayoutMasterSetBuilder.java:130)
at org.docx4j.convert.out.fo.LayoutMasterSetBuilder.getLayoutMasterSetFragment(LayoutMasterSetBuilder.java:94)
at org.docx4j.convert.out.fo.XsltFOFunctions.getLayoutMasterSetFragment(XsltFOFunctions.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:343)
at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440)
at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222)
at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:473)
at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208)
at org.apache.xpath.XPath.execute(XPath.java:337)
at org.apache.xalan.templates.ElemCopyOf.execute(ElemCopyOf.java:134)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1273)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1251)
at org.docx4j.XmlUtils.transform(XmlUtils.java:992)
at org.docx4j.XmlUtils.transform(XmlUtils.java:883)
at org.docx4j.convert.out.common.AbstractXsltExporterDelegate.process(AbstractXsltExporterDelegate.java:59)
at org.docx4j.convert.out.common.AbstractWmlExporter.process(AbstractWmlExporter.java:63)
at org.docx4j.convert.out.common.AbstractWmlExporter.process(AbstractWmlExporter.java:32)
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:79)
at org.docx4j.Docx4J.toFO(Docx4J.java:475)
at org.docx4j.Docx4J.toPDF(Docx4J.java:489)
at org.docx4j.convert.out.pdf.viaXSLFO.Conversion.output(Conversion.java:70)
at test.pdfcreator.MembershipLetterCreator.createDocument(MembershipLetterCreator.java:224)
at test.pdfcreator.MembershipLetterCreator.processLetters(MembershipLetterCreator.java:145)
at test.pdfcreator.MembershipLetterCreator.execute(MembershipLetterCreator.java:250)
at test.util.execute.Executable.run(Executable.java:22)
at test.util.execute.Executable.main(Executable.java:13)
Caused by: org.apache.fop.fo.pagination.PageProductionException: No simple-page-master matching "s1-default" in page-sequence-master "fo:repeatable-page-master-alternatives". (See position 1:1258)
at org.apache.fop.fo.pagination.PageProductionException$PageProductionExceptionFactory.createException(PageProductionException.java:103)
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.$Proxy33.noMatchingPageMaster(Unknown Source)
at org.apache.fop.fo.pagination.ConditionalPageMasterReference.resolveReferences(ConditionalPageMasterReference.java:167)
at org.apache.fop.fo.pagination.RepeatablePageMasterAlternatives.resolveReferences(RepeatablePageMasterAlternatives.java:198)
at org.apache.fop.fo.pagination.LayoutMasterSet.resolveSubSequenceReferences(LayoutMasterSet.java:124)
at org.apache.fop.fo.pagination.LayoutMasterSet.endOfNode(LayoutMasterSet.java:77)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1781)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2957)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
at org.docx4j.convert.out.fo.renderers.FORendererApacheFOP.render(FORendererApacheFOP.java:204)
at org.docx4j.convert.out.fo.renderers.FORendererApacheFOP.render(FORendererApacheFOP.java:153)
at org.docx4j.convert.out.fo.AbstractFOExporter.postprocess(AbstractFOExporter.java:135)
at org.docx4j.convert.out.fo.AbstractFOExporter.postprocess(AbstractFOExporter.java:45)
at org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:82)
... 40 more
23-04-2014 10:54:48 (Error) Exception : org.docx4j.openpackaging.exceptions.Docx4JException
23-04-2014 10:54:48 (Error) Description: Exception exporting package
23-04-2014 10:54:48 (Error) Stack Trace:
23-04-2014 10:54:48 (Error) org.docx4j.convert.out.common.AbstractExporter.export(AbstractExporter.java:97)
23-04-2014 10:54:48 (Error) org.docx4j.Docx4J.toFO(Docx4J.java:475)
23-04-2014 10:54:48 (Error) org.docx4j.Docx4J.toPDF(Docx4J.java:489)
23-04-2014 10:54:48 (Error) org.docx4j.convert.out.pdf.viaXSLFO.Conversion.output(Conversion.java:70)
23-04-2014 10:54:48 (Error) test.pdfcreator.MembershipLetterCreator.createDocument(MembershipLetterCreator.java:224)
23-04-2014 10:54:48 (Error) test.pdfcreator.MembershipLetterCreator.processLetters(MembershipLetterCreator.java:145)
23-04-2014 10:54:48 (Error) test.pdfcreator.MembershipLetterCreator.execute(MembershipLetterCreator.java:250)
23-04-2014 10:54:48 (Error) test.util.execute.Executable.run(Executable.java:22)
23-04-2014 10:54:48 (Error) test.util.execute.Executable.main(Executable.java:13)
23-04-2014 10:54:48 (Error) MembershipLetterCreator aborted.
23-04-2014 10:54:48 (Error) Exit code: -1
23-04-2014 10:54:48 (Error) Execution time: 00:00:30.898