You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by twfurst <th...@gmail.com> on 2010/12/21 16:50:12 UTC
FOP embedded in Java app not rendering graphics
Hello,
I am hoping that someone will be able to tell me what I've done wrong. I am
attempting to build a GUI interface for using FOP for a customer to publish
their XML based manuals to PDF. I am pretty green in Java, but following a
few tutorials, I have managed to create an app that 90% works. FOP is
processing the XML, but it is not rendering any of the graphics into the
PDF. When I run the same XML/XSL-FO from the CMD prompt, everything runs
fine. I am using FOP 1.0.
I attempted to attach the app, but it is above the size limit for upload. I
am going to place the Java code into a .txt file, and maybe someone can tell
from that what the issue is.
http://old.nabble.com/file/p30507137/nabbleUpload.zip nabbleUpload.zip
I am pretty confident that it is something simple that I have omitted.
Thank you for your help.
Tom Furst
--
View this message in context: http://old.nabble.com/FOP-embedded-in-Java-app-not-rendering-graphics-tp30507137p30507137.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
Re: FOP embedded in Java app not rendering graphics
Posted by Rob Sargent <rs...@xmission.com>.
Your java app can find the files in either a supplied jar (if they're
that static) as a resource or in some relative dir from current working
directory or in some named dir defined on the command-line or in the
environment
On 12/21/2010 10:49 AM, Furst, Tom wrote:
> No, did not look for WARNING. Believe I looked for graphic. I have somewhat resolved this, but not what I would call the ideal solution. It appears to me that I have some sort of URI resolver issue. In the stylesheet I changed all the relative uri's to absolute URI's, and I now have all of my graphics. Problem being, the absolute address I have here will more than likely not be the same at my end users desk. I'm kinda lost as to how or what I need to modify.
>
> -----Original Message-----
> From: John Brown [mailto:johnbrown105@hotmail.com]
> Sent: Tuesday, December 21, 2010 12:31 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP embedded in Java app not rendering graphics
>
> Furst, Tom <tom.furst <at> rcmt.com> writes:
>
>
>> Forgot the attachment. Here it is.
>>
>>
>> Chris,
>>
>> There a number of warnings, but none that relate missing images.
>>
>
> There are *36* occurrences of "Image not found" in your log file, such as:
>
>
>> SEVERE: Image not found. URI: illustrations/KH-Logo-large1.jpg.
>> (No context info available)
>>
> How could you say that none of the warnings relate to missing images?
> Let me guess: you grepped WARNING and you did not find these because
> they are SEVERE.
>
> Now that you have reported your problem accurately, I am sure that
> an expert will be able to help you in short order. Until then, I
> believe that the problem is that your <fo:external-graphic> tag
> should look like this:
>
> <fo:external-graphic src=url("path/to/image/jpg") blah-blah-blah />
>
> Is that what you have? This brings me to my second point.
>
> What you should really submit is a minimal XSL-FO file that causes the
> problem.
>
>
> Regards,
> Alias John Brown.
>
>
> ---------------------------------------------------------------------
> 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
RE: FOP embedded in Java app not rendering graphics
Posted by "Furst, Tom" <to...@rcmt.com>.
No, did not look for WARNING. Believe I looked for graphic. I have somewhat resolved this, but not what I would call the ideal solution. It appears to me that I have some sort of URI resolver issue. In the stylesheet I changed all the relative uri's to absolute URI's, and I now have all of my graphics. Problem being, the absolute address I have here will more than likely not be the same at my end users desk. I'm kinda lost as to how or what I need to modify.
-----Original Message-----
From: John Brown [mailto:johnbrown105@hotmail.com]
Sent: Tuesday, December 21, 2010 12:31 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP embedded in Java app not rendering graphics
Furst, Tom <tom.furst <at> rcmt.com> writes:
>
> Forgot the attachment. Here it is.
>
>
> Chris,
>
> There a number of warnings, but none that relate missing images.
There are *36* occurrences of "Image not found" in your log file, such as:
> SEVERE: Image not found. URI: illustrations/KH-Logo-large1.jpg.
> (No context info available)
How could you say that none of the warnings relate to missing images?
Let me guess: you grepped WARNING and you did not find these because
they are SEVERE.
Now that you have reported your problem accurately, I am sure that
an expert will be able to help you in short order. Until then, I
believe that the problem is that your <fo:external-graphic> tag
should look like this:
<fo:external-graphic src=url("path/to/image/jpg") blah-blah-blah />
Is that what you have? This brings me to my second point.
What you should really submit is a minimal XSL-FO file that causes the
problem.
Regards,
Alias John Brown.
---------------------------------------------------------------------
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
Re: FOP embedded in Java app not rendering graphics
Posted by John Brown <jo...@hotmail.com>.
Furst, Tom <tom.furst <at> rcmt.com> writes:
>
> Forgot the attachment. Here it is.
>
>
> Chris,
>
> There a number of warnings, but none that relate missing images.
There are *36* occurrences of "Image not found" in your log file, such as:
> SEVERE: Image not found. URI: illustrations/KH-Logo-large1.jpg.
> (No context info available)
How could you say that none of the warnings relate to missing images?
Let me guess: you grepped WARNING and you did not find these because
they are SEVERE.
Now that you have reported your problem accurately, I am sure that
an expert will be able to help you in short order. Until then, I
believe that the problem is that your <fo:external-graphic> tag
should look like this:
<fo:external-graphic src=url("path/to/image/jpg") blah-blah-blah />
Is that what you have? This brings me to my second point.
What you should really submit is a minimal XSL-FO file that causes the
problem.
Regards,
Alias John Brown.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: FOP embedded in Java app not rendering graphics
Posted by "Furst, Tom" <to...@rcmt.com>.
Forgot the attachment. Here it is.
-----Original Message-----
From: Furst, Tom [mailto:tom.furst@rcmt.com]
Sent: Tuesday, December 21, 2010 11:37 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: FOP embedded in Java app not rendering graphics
Chris,
There a number of warnings, but none that relate missing images. I will attach the text file of these. When I build the app, in the lib folder, I have the following jar files:
avalon-framework-4.2.0
batik-all-1.7
commons-io-1.3.1
commons-logging-1.0.4
fop
serializer-2.7.0
xalan-2.7.0
xercesImpl-2.7.1
xml-apis-1.3.04
xml-apis-ext-1.3.04
xmlgraphics-commons-1.4
As I stated previously, I'm pretty green when it comes to Java, so I am not really sure how/where I would need to make any changes. I based this app off the example code that comes with FOP in the examples folder, and am trying to use it in a GUI setting.
Thanks for the reply.
-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
Sent: Tuesday, December 21, 2010 11:25 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP embedded in Java app not rendering graphics
On 21/12/2010 15:50, twfurst wrote:
> Hello,
Hi
> I am hoping that someone will be able to tell me what I've done wrong. I am
> attempting to build a GUI interface for using FOP for a customer to publish
> their XML based manuals to PDF. I am pretty green in Java, but following a
> few tutorials, I have managed to create an app that 90% works. FOP is
> processing the XML, but it is not rendering any of the graphics into the
> PDF. When I run the same XML/XSL-FO from the CMD prompt, everything runs
> fine. I am using FOP 1.0.
Does FOP log any warnings/errors related to the missing images? Logging
is done via commons logger which you will have to configure within your
own application. At a guess the images could be missing due to classpath
issues in your own application. Depending on the type of image you will
need some extra libraries in your classpath to support them , e.g.
batik.jar or imageio-tools.jar
> I attempted to attach the app, but it is above the size limit for upload. I
> am going to place the Java code into a .txt file, and maybe someone can tell
> from that what the issue is.
>
> http://old.nabble.com/file/p30507137/nabbleUpload.zip nabbleUpload.zip
>
> I am pretty confident that it is something simple that I have omitted.
>
> Thank you for your help.
Thanks,
Chris
> Tom Furst
---------------------------------------------------------------------
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
RE: FOP embedded in Java app not rendering graphics
Posted by "Furst, Tom" <to...@rcmt.com>.
Chris,
There a number of warnings, but none that relate missing images. I will attach the text file of these. When I build the app, in the lib folder, I have the following jar files:
avalon-framework-4.2.0
batik-all-1.7
commons-io-1.3.1
commons-logging-1.0.4
fop
serializer-2.7.0
xalan-2.7.0
xercesImpl-2.7.1
xml-apis-1.3.04
xml-apis-ext-1.3.04
xmlgraphics-commons-1.4
As I stated previously, I'm pretty green when it comes to Java, so I am not really sure how/where I would need to make any changes. I based this app off the example code that comes with FOP in the examples folder, and am trying to use it in a GUI setting.
Thanks for the reply.
-----Original Message-----
From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
Sent: Tuesday, December 21, 2010 11:25 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP embedded in Java app not rendering graphics
On 21/12/2010 15:50, twfurst wrote:
> Hello,
Hi
> I am hoping that someone will be able to tell me what I've done wrong. I am
> attempting to build a GUI interface for using FOP for a customer to publish
> their XML based manuals to PDF. I am pretty green in Java, but following a
> few tutorials, I have managed to create an app that 90% works. FOP is
> processing the XML, but it is not rendering any of the graphics into the
> PDF. When I run the same XML/XSL-FO from the CMD prompt, everything runs
> fine. I am using FOP 1.0.
Does FOP log any warnings/errors related to the missing images? Logging
is done via commons logger which you will have to configure within your
own application. At a guess the images could be missing due to classpath
issues in your own application. Depending on the type of image you will
need some extra libraries in your classpath to support them , e.g.
batik.jar or imageio-tools.jar
> I attempted to attach the app, but it is above the size limit for upload. I
> am going to place the Java code into a .txt file, and maybe someone can tell
> from that what the issue is.
>
> http://old.nabble.com/file/p30507137/nabbleUpload.zip nabbleUpload.zip
>
> I am pretty confident that it is something simple that I have omitted.
>
> Thank you for your help.
Thanks,
Chris
> Tom Furst
---------------------------------------------------------------------
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
Re: FOP embedded in Java app not rendering graphics
Posted by Chris Bowditch <bo...@hotmail.com>.
On 21/12/2010 15:50, twfurst wrote:
> Hello,
Hi
> I am hoping that someone will be able to tell me what I've done wrong. I am
> attempting to build a GUI interface for using FOP for a customer to publish
> their XML based manuals to PDF. I am pretty green in Java, but following a
> few tutorials, I have managed to create an app that 90% works. FOP is
> processing the XML, but it is not rendering any of the graphics into the
> PDF. When I run the same XML/XSL-FO from the CMD prompt, everything runs
> fine. I am using FOP 1.0.
Does FOP log any warnings/errors related to the missing images? Logging
is done via commons logger which you will have to configure within your
own application. At a guess the images could be missing due to classpath
issues in your own application. Depending on the type of image you will
need some extra libraries in your classpath to support them , e.g.
batik.jar or imageio-tools.jar
> I attempted to attach the app, but it is above the size limit for upload. I
> am going to place the Java code into a .txt file, and maybe someone can tell
> from that what the issue is.
>
> http://old.nabble.com/file/p30507137/nabbleUpload.zip nabbleUpload.zip
>
> I am pretty confident that it is something simple that I have omitted.
>
> Thank you for your help.
Thanks,
Chris
> Tom Furst
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org