Hello, I am trying to use fox:external-document to include pdf files using FOP 1.1.
I am doing this embedded, but have reproduced the problems in a stand-alone test case. The embedded problems appear on Apple Java 1.6.0_37 64 bit and Oracle Java 1.6.0_34 on Windows 64. The stand-alone test case was only run on the Apple Java (listed above). The first problem was previously mentioned on the mailing list: The fop-pdf-images JAR being required. If this is required, it should be included or documented clear as day (especially on the extensions.html documentation page for fox:external-document). After including all four .jars from the fop-pdf-images download, I get the following exception: Exception in thread "main" java.lang.VerifyError: (class: org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter, method: cloneForNewDocument signature: (Ljava/lang/Object;Ljava/lang/Object;Ljava/util/Collection;)Ljava/lang/Object;) Incompatible argument to function at org.apache.fop.render.pdf.pdfbox.AbstractPDFBoxHandler.createFormForPDF(AbstractPDFBoxHandler.java:90) at org.apache.fop.render.pdf.pdfbox.PDFBoxImageHandler.handleImage(PDFBoxImageHandler.java:57) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:228) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:184) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:149) at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:271) at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:150) at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1272) at org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1259) at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:816) at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:785) at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:866) at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:678) at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:913) at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:643) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:561) at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:598) at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:980) at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:546) at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:451) at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:738) at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:428) at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:352) at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:299) at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:748) at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:273) at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:238) at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:597) at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123) at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:312) at org.apache.fop.layoutmgr.ExternalDocumentLayoutManager.makePageForImage(ExternalDocumentLayoutManager.java:173) at org.apache.fop.layoutmgr.ExternalDocumentLayoutManager.activateLayout(ExternalDocumentLayoutManager.java:116) at org.apache.fop.area.AreaTreeHandler.endExternalDocument(AreaTreeHandler.java:289) at org.apache.fop.fo.extensions.ExternalDocument.endOfNode(ExternalDocument.java:99) at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347) at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181) at org.apache.xml.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:261) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1399) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:393) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:176) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1374) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2411) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2281) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:709) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1284) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1262) at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300) at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130) at org.apache.fop.cli.Main.startFOP(Main.java:177) at org.apache.fop.cli.Main.main(Main.java:208) Command used: fop -xml data.xml -xsl output.xsl -pdf output.pdf data.xml: -------- <?xml version="1.0" encoding="UTF-8" ?> <documents> <pdf src="input.pdf"/> </documents> output.xsl: -------- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml"/> <xsl:template match="/"> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="my-page"> <fo:region-body/> </fo:simple-page-master> </fo:layout-master-set> <xsl:apply-templates select="documents/pdf"/> </fo:root> </xsl:template> <xsl:template match="pdf"> <fo:page-sequence master-reference="my-page"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:value-of select="'Including PDF: '"/> <xsl:value-of select="@src"/> </fo:block> <fo:block> <xsl:value-of select="'Document starts on next page'"/> </fo:block> </fo:flow> </fo:page-sequence> <fox:external-document> <xsl:attribute name="content-type">pdf</xsl:attribute> <xsl:attribute name="src">url('<xsl:value-of select="@src"/>')</xsl:attribute> </fox:external-document> </xsl:template> </xsl:stylesheet> Is there anything I can do to make this work? Thank you, Jonathan --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org