Re: Problem with FOP when generating a PNG
Hi Peter, I looked after the scale factor in the paint method of my Graphics2DImagePainter. When I export in pdf/ps, the scale factor is 1 and when I export in PNG, it's 1/1000. I saw that in Java2DPainter class the fonts are scaled by 1000 when used in drawText. In my mind you should do the same thing for drawImage. I made some tests and all is ok for me (and my plugin). What's your opinion ? Calixte Le jeudi 04 novembre 2010 à 13:09 +, Peter Hancock a écrit : Hi Calixte, Where you able to replicate the issue without integration with your plugin? Pete On Thu, Nov 4, 2010 at 10:16 AM, Calixte Denizet cali...@contrib.scilab.org wrote: Le jeudi 04 novembre 2010 à 10:02 +, Peter Hancock a écrit : Hi Calixte, Hello Peter, i) git clone git://git.forge.scilab.org/jlatexmath.git ii) cd jlatexmath iii) ant ant fop iv) you should have the 2 files jlatexmath-0.9.4.jar, jlatexmath-fop-0.9.4.jar in dist/, put them in the classpath (I put them in /usr/share/java in my Debian squeeze with sun java) v) cd cd plugin/fop/examples/ vi) fop -c conf.xml -fo latex.fo -pdf test.pdf works fine (thanks for that) vi) fop -c conf.xml -fo latex.fo -png test.png doesn't work since the latex images are not drawn. Thanks a lot Best regards Calixte Could you please describe the steps and attach any files required to replicate this bug independently of your plugin. If you are unable to do that and you think the bug may be in the plugin integration mechanism, we will require installation instructions for the fop plugin to proceed (maybe we jist need to add a jar but please let us know- it was not clear from the link). Thanks, Pete On Wed, Nov 3, 2010 at 8:28 PM, Calixte Denizet cali...@contrib.scilab.org wrote: Hi all, I wrote a FOP plugin to handle LaTeX notation in FO document. I use a class which extends AbstractImageConverter and with a target flavor equals to ImageFlavor.GRAPHICS2D. All is ok when I convert a .fo into a pdf or ps, but I met problems when I tryed to convert into png: the latex images are not drawn... I have no problems with fop 0.95 (I just retryed and all is ok), it is only with fop 1.0 and the trunk version. My loaders and converters can be found here: http://forge.scilab.org/index.php/p/jlatexmath/source/tree/master/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader Any ideas ? Calixte
Re: Problem with FOP when generating a PNG
Le jeudi 04 novembre 2010 à 10:02 +, Peter Hancock a écrit : Hi Calixte, Hello Peter, i) git clone git://git.forge.scilab.org/jlatexmath.git ii) cd jlatexmath iii) ant ant fop iv) you should have the 2 files jlatexmath-0.9.4.jar, jlatexmath-fop-0.9.4.jar in dist/, put them in the classpath (I put them in /usr/share/java in my Debian squeeze with sun java) v) cd cd plugin/fop/examples/ vi) fop -c conf.xml -fo latex.fo -pdf test.pdf works fine (thanks for that) vi) fop -c conf.xml -fo latex.fo -png test.png doesn't work since the latex images are not drawn. Thanks a lot Best regards Calixte Could you please describe the steps and attach any files required to replicate this bug independently of your plugin. If you are unable to do that and you think the bug may be in the plugin integration mechanism, we will require installation instructions for the fop plugin to proceed (maybe we jist need to add a jar but please let us know- it was not clear from the link). Thanks, Pete On Wed, Nov 3, 2010 at 8:28 PM, Calixte Denizet cali...@contrib.scilab.org wrote: Hi all, I wrote a FOP plugin to handle LaTeX notation in FO document. I use a class which extends AbstractImageConverter and with a target flavor equals to ImageFlavor.GRAPHICS2D. All is ok when I convert a .fo into a pdf or ps, but I met problems when I tryed to convert into png: the latex images are not drawn... I have no problems with fop 0.95 (I just retryed and all is ok), it is only with fop 1.0 and the trunk version. My loaders and converters can be found here: http://forge.scilab.org/index.php/p/jlatexmath/source/tree/master/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader Any ideas ? Calixte
Re: Problem with FOP when generating a PNG
Le jeudi 04 novembre 2010 à 13:09 +, Peter Hancock a écrit : Hi Calixte, Where you able to replicate the issue without integration with your plugin? No I cannot. Maybe I made some errors in my code, but it's weird that all is fine with pdf output and not with png output. The paint method in the class Graphics2DImagePainterJLaTeXMath.java is called, I tryed to make a simple g2d.setColor(Color.RED);g2d.fill(rect2d) rather than to paint my icon and in the pdf I got filled red rect. but not in png. I know the difficulties met to debug a foreign code, so if I could help you, don't hesitate. Did you manage to compile jlatexmath and the fop plugin ? Calixte Pete On Thu, Nov 4, 2010 at 10:16 AM, Calixte Denizet cali...@contrib.scilab.org wrote: Le jeudi 04 novembre 2010 à 10:02 +, Peter Hancock a écrit : Hi Calixte, Hello Peter, i) git clone git://git.forge.scilab.org/jlatexmath.git ii) cd jlatexmath iii) ant ant fop iv) you should have the 2 files jlatexmath-0.9.4.jar, jlatexmath-fop-0.9.4.jar in dist/, put them in the classpath (I put them in /usr/share/java in my Debian squeeze with sun java) v) cd cd plugin/fop/examples/ vi) fop -c conf.xml -fo latex.fo -pdf test.pdf works fine (thanks for that) vi) fop -c conf.xml -fo latex.fo -png test.png doesn't work since the latex images are not drawn. Thanks a lot Best regards Calixte Could you please describe the steps and attach any files required to replicate this bug independently of your plugin. If you are unable to do that and you think the bug may be in the plugin integration mechanism, we will require installation instructions for the fop plugin to proceed (maybe we jist need to add a jar but please let us know- it was not clear from the link). Thanks, Pete On Wed, Nov 3, 2010 at 8:28 PM, Calixte Denizet cali...@contrib.scilab.org wrote: Hi all, I wrote a FOP plugin to handle LaTeX notation in FO document. I use a class which extends AbstractImageConverter and with a target flavor equals to ImageFlavor.GRAPHICS2D. All is ok when I convert a .fo into a pdf or ps, but I met problems when I tryed to convert into png: the latex images are not drawn... I have no problems with fop 0.95 (I just retryed and all is ok), it is only with fop 1.0 and the trunk version. My loaders and converters can be found here: http://forge.scilab.org/index.php/p/jlatexmath/source/tree/master/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader Any ideas ? Calixte
Problem with FOP when generating a PNG
Hi all, I wrote a FOP plugin to handle LaTeX notation in FO document. I use a class which extends AbstractImageConverter and with a target flavor equals to ImageFlavor.GRAPHICS2D. All is ok when I convert a .fo into a pdf or ps, but I met problems when I tryed to convert into png: the latex images are not drawn... I have no problems with fop 0.95 (I just retryed and all is ok), it is only with fop 1.0 and the trunk version. My loaders and converters can be found here: http://forge.scilab.org/index.php/p/jlatexmath/source/tree/master/plugin/fop/src/org/scilab/forge/jlatexmath/fop/image/loader Any ideas ? Calixte