While I am at it here is the servlet code.

JFreeChart chart = chartService.getTimePeriodChart(metric, frequencyType);

        response.setContentType("image/jpeg");

        OutputStream out = response.getOutputStream();

        ChartUtilities.writeChartAsJPEG(out, chart, 500, 300);

        out.flush();


On Jun 21, 2005, at 10:54 AM, Nathan Maves wrote:

if it is any use here is the error logs....

[ERROR] Logger not set
[INFO] building formatting object tree
[WARNING] Screen logger not set - Using ConsoleLogger.
[INFO] setting up fonts
[INFO] [1]
[ERROR] Could not load external SVG: Root element does not match that requested:
Requested: svg
Found: script
[ERROR] Error while creating area : No ImageReader for this type of image (http://localhost:9044/Scorecard/View/MetricChart.do? metricId=5489&frequencyId=4)
[INFO] Parsing of document complete, stopping renderer

Why are the references to svg when I am not using it?


Nathan

On Jun 21, 2005, at 10:35 AM, Nathan Maves wrote:


J,

I was able to remove all refrencies to the session from my servlet. I was also able to view the image by calling the servlet directly in a browser. Last of all I was able to save this viewed image to a file. I then used it directly in a pdf and it worked. Why would FOP be able to determine the image type from a file and not from my servlet?

Nathan

On Jun 11, 2005, at 2:17 PM, J.Pietschmann wrote:



Nathan Maves wrote:



I have a servlet (struts) that returns a generated chart.
What is the best/simplest way to get this into a pdf?



...



<fo:external-graphic src="url(http://localhost: 8080/ ScoreCard/View/MetricChart.do)"/>




In general, this should work.
...



[ERROR] Could not load external SVG: Premature end of file.
[ERROR] Error while creating area : No ImageReader for this type of image (http://localhost:8080/ScoreCard/View/MetricChart.do)




The image reader was't able to determine the image type,
or got some other problem. Check the instructions in the FAQ
 http://xml.apache.org/fop/faq.html#graphic-not-displayed
in particular:
- Check whether you can display the image in a browser
- Download a generated image into a file and try to use it
 from this file (i.e. check whether the problem is with the
 content of the image itself or whether it has somethiing to
 do with being loaded via HTTP).
- If the problem is the image itself, try to open it in another
 graphics viewer in order to get more information about what
 might be wrong
- If the problem is with image delivery, well, fix them. A missing
 session cookie is a likely candidate for the cause.

J.Pietschmann

-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: fop-users- [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: fop-users- [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to