xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmhelp <lm...@wanadoo.fr>
Subject Fop in Java and Eclipse
Date Mon, 04 May 2009 15:38:17 GMT

Hi everyone,

Thank you for reading my post.

Do you know about the following directory:

> "fop_0.95\examples\embedding\java\embedding"

in which one can find the following file:

> "ExampleXML2PDF.java" ?

This program allows to compute a ".pdf" file
given a ".xml" data file and a ".xsl" stylesheet.

I copied "ExampleXML2PDF.java" stricto (with no modifications)
to the "src/my_package_name" Eclipse folder
("my_package_name" is a Java package I created).

I launched it and it worked:
the ".pdf" file was correctly created.

Now, "ExampleXML2PDF.java" contains a class "ExampleXML2PDF"
which contains the "main" method (only). Everything is done 
in that method.

[I wanted a "real" class with no "main" method]
I created a new Java class "XmlToPdfFactory"
and a new method "createPdfFile()" inside of
Then, I copied stricto the contents of the "main"
method into "createPdfFile()".

After doing that, I created (in a method of another class)
an instance of the "XmlToPdfFactory" and sent the 
"createPdfFile()" message to this new object:

> XmlToPdfFactory xmlToPdfFactoryObj = new XmlToPdfFactory();
> xmlToPdfFactoryObj.createPdfFile();

I get the following error:

> java.io.FileNotFoundException: 
> C:\Program Files\java\eclipse\WebContent\xml\xslt\projectteam2fo.xsl 
> (The system cannot find the path specified)

And this is true, there is no "WebContent\xml\xslt\projectteam2fo.xsl"
in "C:\Program Files\java\eclipse\".

"WebContent\xml\xslt\projectteam2fo.xsl" exists but somewhere else...

I hope this problem is relevant here.

Thanks in advance for your help,
View this message in context: http://www.nabble.com/Fop-in-Java-and-Eclipse-tp23370964p23370964.html
Sent from the FOP - Users mailing list archive at Nabble.com.

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

View raw message