xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benoit, Frederick C." <FREDERICK.C.BEN...@saic.com>
Subject java.lang.IllegalArgumentException rendering PDF
Date Mon, 25 Oct 2010 19:28:16 GMT
I am getting closer to a working solution with FOP 1.0 and .NET.  Upon
calling the transform method on the Transformer object,
java.lang.IllegalArgumentException error is thrown.

 

Code:

 

FopFactory fopFactory = FopFactory.newInstance();

FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); 

Fop fop = fopFactory.newFop("application/pdf", outputStream);

 

TransformerFactory transformerFactoryObj = new
org.apache.xalan.processor.TransformerFactoryImpl();

Transformer transformerObj = transformerFactoryObj.newTransformer(new
StreamSource("myXslt.xslt"));

StreamSource streamSourceObj = new
StreamSource(dataSetObj.GetXml().Replace("\n", "<br/>"));

 

SAXResult saxResultObj = new SAXResult(fop.getDefaultHandler());

 

transformerObj.transform(streamSourceObj, saxResultObj);

 

Stack Trace:

 

   at org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(Source source,
Boolean unique, DTMWSFilter whiteSpaceFilter, Boolean incremental,
Boolean doIndexing)

   at org.apache.xalan.transformer.TransformerImpl.transform(Source
source, Boolean shouldRelease)

   at org.apache.xalan.transformer.TransformerImpl.transform(Source
xmlSource, Result outputTarget, Boolean shouldRelease)

   at org.apache.xalan.transformer.TransformerImpl.transform(Source
xmlSource, Result outputTarget)

   at SLPPMIS.Reports.Business.PdfRender.Render(Page page, DataSet ds,
String xsltFilename, String reportName, XsltArgumentList xsltArgs) in
C:\dev\CodeDev\src\reports\Business\PdfRender.cs:line 202

 

Any ideas?

 

Regards,

 

Clay Benoit 



 


Mime
View raw message