Hi,
I have embeded fop 0.93 in a simple java application (working with Netbeans
5.5 on windows XP and JDK 1.5) to obtain pdf files using xml files
transformed by xslt files.
Generally speaking it works fine however I experienced the following
difficulties:
MathML:
======
- embedding Jeuclid using fop examples, I had to change the size of the
output in pdf using the following modification in
PDFSVGHandler.renderSVGDocument(RendererContext context,Document doc):
//ModifJf Batik doesn't read the width and height attribute of svg
element in svg document ?
//(see SVGSVGElementBridge). the context reads the default size from
svgUserAgent
//so I change the default dimension to document values
boolean isMathML = true;
if (isMathML){
Dimension dimension = new Dimension((int) (pdfInfo.width /
1000f),(int)(pdfInfo.height / 1000f));
ua.setViewportSize(dimension);
}
Fonts:
=====
- when embedding Arial Unicode MS font using TTFReader I had to change the
font's name avoiding spaces
- I had to change the following in TTFReader.java
// TTFFile ttf = app.loadTTF(arguments[0], ttcName);
TTFFile ttf = app.loadTTF(arguments[0], fontName);//ModifJf
- I also had to comment a line in TTFFile.java as follows to avoid an
exception
// in.skip(4 * 4);//Modif Jf
Bitmaps:
=======
I experienced the known issue of images not shrinking in the page but also:
- GIF images : for the time being the result in pdf is always bad (bad
size, poor rendering)
- JPEG images : I have quite good rendering and fop seems to use the actual
resolution of the file
- PNG images : good rendering but I have to work around size in order to
get a good result
So my question is: could you show me a better way to obtain the same result
(MathML, Fonts) and the optimal way to manage bitmaps. My intention is to
convert all images from gif to jpeg or png. Could you confirm it is a good
idea?
cheers
Jean-François MAUREL
Directeur technique
Technical manager
PI Méca
4,rue de l'abreuvoir F-92400 Courbevoie
Tél: 33 (0)1 47 17 65 13
Fax: 33 (0)1 56 04 15 81
http://www.pimeca.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]