xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Li, Jing" <jing.li....@roche.com>
Subject RE: JFreeChart does not display the data
Date Wed, 28 Sep 2011 18:29:29 GMT
Jeremias,

I gave up to use ImageGraphics2D, instead I finally make it work with SVGGraphics2D.  So I
wrote a preloader where the JFreeChart draws the chart to a SVGGraphics2D, then create a ImageXMLDOM
from it.  Everything happened in memory, works great!

Now I have another question, since there are a lot of images and charts in my report, is there
any ways to compress the image in FOP to make PDF file size smaller?

Thanks for your help. Your insights are always helpful.

Best
Jing

-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch] 
Sent: Thursday, September 22, 2011 9:59 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: JFreeChart does not display the data

Hi Jing,

PDFGraphics2D is not a complete implementation of the Graphics2D interface. There are a few
gaps. Maybe JFreeChart uses one of these missing features. There could also be a bug. I suggest
you set a few break points in PDFGraphics2D (you'll see which methods are empty).
Another thing you can do is generate a TIFF instead of a PDF with FOP.
If the full chart is rendered to TIFF, you'll know that your own glue code really works and
there is probably an incompatibility with PDFGraphics2D. If it doesn't work, it's not PDFGraphics2D.

HTH

On 21.09.2011 16:05:27 Li, Jing wrote:
> Jeremias,
> 
> I cc you, hope I can get some advice from you, since you have a lot of experience about
the custom image loaders. 
> 
> My project needs create a lot of images and charts on the fly and put them in a pdf report
in the end.  I took your advice last time (See "image loading callback" back in July), wrote
the preloader, loader and loader factory for both BufferedImage and JFreeChart using fop 1.0.
The BufferedImage one works out nicely, the images display fine, the same as what is in Swing
Panel. But when I took the same approach for the charts, JFreeChart does not show the content
curves, while the same code put in a Swing panel display fine.  I suspect there are bugs in
fop that prevent it displaying, but could not figure how to fix it.  Your insight will be
highly appreciated.
> 
> The line in xsl-fo related to it is:
>                      <fo:block>
>                         <fo:external-graphic   src="url('chart/cwf/')" content-width="300pt"
/>
>                     </fo:block>
> 
> Environment:  Window 7, fop 1.0, Java 6.
> 
> There is no any error message in the trace, the customer preloader and loader all gets
called, everything runs fine, except when you open the generated pdf, it show the error message,
and the content curve is missing. I tried to preflight the pdf, there is no error observed
either.
> 
> Thanks
> Jing
> 
> 
> 
> -----Original Message-----
> From: Pascal Sancho [mailto:pascal.sancho@takoma.fr]
> Sent: Wednesday, September 21, 2011 2:50 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: JFreeChart does not display the data
> 
> Reading back the properties of your attached PDF, I realize that it is made with FOP
1.0 and it is buggy when reading it.
> So, I apologize for my too quick preceding answer.
> 
> Anyway, you should give further information:
>  - short XSL-FO that demonstrates the issue
>  - trace or log, if any
>  - environment, process, etc.
> 
> Le 21/09/2011 08:43, Pascal Sancho a écrit :
> > Hi Jing,
> > 
> > I suspect you ask on wrong list, no? IIUC, I see nothing to do with 
> > FOP in your question.
> > 
> > Le 20/09/2011 18:06, Li, Jing a écrit :
> >> Dear All,
> >>
> >>  
> >>
> >> I am working on a project that generates a lot of JFreecharts on 
> >> fly and put them in a PDF report.
> >> I wrote a preloader, loader and source, and for unknown reason, the 
> >> chart only shows the coordinates, legends, etc, but NO DATA curves.
> >> See the attachment.
> >> I feel confused, any help or suggestions will be highly appreciated.
> >>
> >> Thanks
> >> Jing
> > 
> 
> --
> Pascal
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 




Jeremias Maerki


---------------------------------------------------------------------
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