xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Edge" <Martin.E...@intellimail.com.au>
Subject RE: fox:external-document problems
Date Mon, 26 Nov 2012 00:33:35 GMT
Last time I saw that error was because I wasn't using the latest rebuilt
version of pdf-images

Thanks
Martin


-----Original Message-----
From: Luis Bernardo [mailto:lmpmbernardo@gmail.com] 
Sent: Monday, 26 November 2012 11:29 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: fox:external-document problems


I tried your example in a Mac, with exactly the same version of Java you
have, and it worked with no problems. I assume that by stand alone you mean
command line (that is how I ran it).

Did you get the fop-pdf-images plugin from
https://dist.apache.org/repos/dist/dev/xmlgraphics/binaries/?


On 11/25/12 11:32 PM, Jonathan Seng wrote:
> 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/Objec
t;) Incompatible argument to function
> 	at
org.apache.fop.render.pdf.pdfbox.AbstractPDFBoxHandler.createFormForPDF(Abst
ractPDFBoxHandler.java:90)
> 	at
org.apache.fop.render.pdf.pdfbox.PDFBoxImageHandler.handleImage(PDFBoxImageH
andler.java:57)
> 	at
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPai
nter.java:228)
> 	at
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPai
nter.java:184)
> 	at
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHand
ler(AbstractIFPainter.java:149)
> 	at
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(Abstr
actIFPainter.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:12
59)
> 	at
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer
.java:816)
> 	at
org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(Abst
ractPathOrientedRenderer.java:785)
> 	at
org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRendere
r.java:866)
> 	at
org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.jav
a:678)
> 	at
org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.ja
va:913)
> 	at
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:
643)
> 	at
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:56
1)
> 	at
org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:598
)
> 	at
org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:98
0)
> 	at
org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:54
6)
> 	at
org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:451)
> 	at
org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOr
ientedRenderer.java:738)
> 	at
org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.
java:428)
> 	at
org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.jav
a:352)
> 	at
org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer
.java:299)
> 	at
org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRendere
r.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(Abstra
ctPageSequenceLayoutManager.java:312)
> 	at
org.apache.fop.layoutmgr.ExternalDocumentLayoutManager.makePageForImage(Exte
rnalDocumentLayoutManager.java:173)
> 	at
org.apache.fop.layoutmgr.ExternalDocumentLayoutManager.activateLayout(Extern
alDocumentLayoutManager.java:116)
> 	at
org.apache.fop.area.AreaTreeHandler.endExternalDocument(AreaTreeHandler.java
:289)
> 	at
org.apache.fop.fo.extensions.ExternalDocument.endOfNode(ExternalDocument.jav
a: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:26
1)
> 	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1399)
> 	at
org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApp
lyTemplates.java:393)
> 	at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:176)
> 	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
> 	at
org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:
1374)
> 	at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2411)
> 	at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2281)
> 	at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava: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-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message