Re: Arabic characters position ( SVG to PDF )
On the other side, your arabic.svg example doesn't display in either Adobe SVG Reader or Firefox. Looking closely at the SVG itself, I see that there's writing-mode:lr-tb which is certainly wrong for Arabic text. I think the problem's in Inkscape, not in Batik or FOP. If you manually remove the writing-mode from the tspan and instead specify writing-mode:rl-tb on the text element and use Arial instead of Bitstream Vera Sans (which is not on my machine), then the SVG displays correctly in Adobe SVG Reader and Batik Squiggle. On 07.04.2006 10:46:59 Mathieu Leplatre wrote: I tried the PDFTranscoder (0.20.5 and 0.91b) and had the same problems... The words are still misplaced. (I guess Squiggle suffer the same problems then...) Here is how it comes out : http://leplatre.free.fr/pub/arabicmisplaced.png I couldn't find any method of the FOUserAgent (or any XMLHandler class to add neither) to disable PDFTextPainter with XSL-FO programmatically. Thanks you so much for your help so far Mathieu. Jeremias Maerki wrote: You can also convert SVG to PDF directly by using Apache Batik's Transcoder API. For PDF you can use the class org.apache.fop.svg.PDFTranscoder. See: http://xmlgraphics.apache.org/batik/rasterizerTutorial.html The example here is not the same as the one you reported the problem for. The SVG looks fine in Batik's Squiggle (the SVG browser) and in Acrobat Reader when generated with FOP's PDFTranscoder. The configuration file I'm talking about is described here: http://xmlgraphics.apache.org/fop/latest/configuration.html On 06.04.2006 15:59:48 Mathieu Leplatre wrote: I use XSL-FO because I didn't know there was another way to do it. Here is a svg file : leplatre.free.fr/pub/arabic.svg Here is the XSL I made : http://leplatre.free.fr/pub/embed.xsl ...sorry my question will sound stupid but in which configuration file can I put this xml-handler tag ? Thank you Jeremias for your extremely fast reaction time ! Jeremias Maerki wrote: It could be a flaw in the PDFTextPainter. If you provide a sample SVG file I can verify that. You don't say if you're converting through the PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set: xml-handler namespace=http://www.w3.org/2000/svg; stroke-texttrue/stroke-text /xml-handler ...as a direct child of the renderer element for the PDF renderer in the configuration file. The PDFTranscoder currently doesn't support disabling the PDFTextPainter. Note: The above is only tested on the latest FOP Trunk. I can't guarantee without verifying if 0.91beta behaves the same way. On 06.04.2006 15:27:58 Mathieu Leplatre wrote: Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Arabic characters position ( SVG to PDF )
Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Thank you very much Mathieu. -- Mathieu Leplatre Météo France International - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Arabic characters position ( SVG to PDF )
It could be a flaw in the PDFTextPainter. If you provide a sample SVG file I can verify that. You don't say if you're converting through the PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set: xml-handler namespace=http://www.w3.org/2000/svg; stroke-texttrue/stroke-text /xml-handler ...as a direct child of the renderer element for the PDF renderer in the configuration file. The PDFTranscoder currently doesn't support disabling the PDFTextPainter. Note: The above is only tested on the latest FOP Trunk. I can't guarantee without verifying if 0.91beta behaves the same way. On 06.04.2006 15:27:58 Mathieu Leplatre wrote: Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Thank you very much Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Arabic characters position ( SVG to PDF )
I use XSL-FO because I didn't know there was another way to do it. Here is a svg file : leplatre.free.fr/pub/arabic.svg Here is the XSL I made : http://leplatre.free.fr/pub/embed.xsl ...sorry my question will sound stupid but in which configuration file can I put this xml-handler tag ? Thank you Jeremias for your extremely fast reaction time ! Jeremias Maerki wrote: It could be a flaw in the PDFTextPainter. If you provide a sample SVG file I can verify that. You don't say if you're converting through the PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set: xml-handler namespace=http://www.w3.org/2000/svg; stroke-texttrue/stroke-text /xml-handler ...as a direct child of the renderer element for the PDF renderer in the configuration file. The PDFTranscoder currently doesn't support disabling the PDFTextPainter. Note: The above is only tested on the latest FOP Trunk. I can't guarantee without verifying if 0.91beta behaves the same way. On 06.04.2006 15:27:58 Mathieu Leplatre wrote: Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Thank you very much Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mathieu Leplatre Météo France International GSM: +974 579 3608 Fax: +974 436 5086 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Arabic characters position ( SVG to PDF )
You can also convert SVG to PDF directly by using Apache Batik's Transcoder API. For PDF you can use the class org.apache.fop.svg.PDFTranscoder. See: http://xmlgraphics.apache.org/batik/rasterizerTutorial.html The example here is not the same as the one you reported the problem for. The SVG looks fine in Batik's Squiggle (the SVG browser) and in Acrobat Reader when generated with FOP's PDFTranscoder. The configuration file I'm talking about is described here: http://xmlgraphics.apache.org/fop/latest/configuration.html On 06.04.2006 15:59:48 Mathieu Leplatre wrote: I use XSL-FO because I didn't know there was another way to do it. Here is a svg file : leplatre.free.fr/pub/arabic.svg Here is the XSL I made : http://leplatre.free.fr/pub/embed.xsl ...sorry my question will sound stupid but in which configuration file can I put this xml-handler tag ? Thank you Jeremias for your extremely fast reaction time ! Jeremias Maerki wrote: It could be a flaw in the PDFTextPainter. If you provide a sample SVG file I can verify that. You don't say if you're converting through the PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set: xml-handler namespace=http://www.w3.org/2000/svg; stroke-texttrue/stroke-text /xml-handler ...as a direct child of the renderer element for the PDF renderer in the configuration file. The PDFTranscoder currently doesn't support disabling the PDFTextPainter. Note: The above is only tested on the latest FOP Trunk. I can't guarantee without verifying if 0.91beta behaves the same way. On 06.04.2006 15:27:58 Mathieu Leplatre wrote: Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Arabic characters position ( SVG to PDF )
...actually I want vectorial content, not to rasterize my SVG files. I have the same problem with this example and XSL-FO. Ok I'll look where to put this configuration when using fop from a java code... Thank you Mathieu Jeremias Maerki wrote: You can also convert SVG to PDF directly by using Apache Batik's Transcoder API. For PDF you can use the class org.apache.fop.svg.PDFTranscoder. See: http://xmlgraphics.apache.org/batik/rasterizerTutorial.html The example here is not the same as the one you reported the problem for. The SVG looks fine in Batik's Squiggle (the SVG browser) and in Acrobat Reader when generated with FOP's PDFTranscoder. The configuration file I'm talking about is described here: http://xmlgraphics.apache.org/fop/latest/configuration.html On 06.04.2006 15:59:48 Mathieu Leplatre wrote: I use XSL-FO because I didn't know there was another way to do it. Here is a svg file : leplatre.free.fr/pub/arabic.svg Here is the XSL I made : http://leplatre.free.fr/pub/embed.xsl ...sorry my question will sound stupid but in which configuration file can I put this xml-handler tag ? Thank you Jeremias for your extremely fast reaction time ! Jeremias Maerki wrote: It could be a flaw in the PDFTextPainter. If you provide a sample SVG file I can verify that. You don't say if you're converting through the PDFTranscoder or via XSL-FO. If you go via XSL-FO you can set: xml-handler namespace=http://www.w3.org/2000/svg; stroke-texttrue/stroke-text /xml-handler ...as a direct child of the renderer element for the PDF renderer in the configuration file. The PDFTranscoder currently doesn't support disabling the PDFTextPainter. Note: The above is only tested on the latest FOP Trunk. I can't guarantee without verifying if 0.91beta behaves the same way. On 06.04.2006 15:27:58 Mathieu Leplatre wrote: Hi all, I use fop to convert SVG files to PDF. My SVG contains UTF8 strings in arabic (direction right to left). Encoding and such characters are supported but the words are misplaced (it looks like the origin (x,y) is placed at ( x + lenght, y ). Here is an example to figure it out : http://leplatre.free.fr/pub/examplearabic.png Is it a known bug ? I didn't see anything about this in 0.92 change log... Does someone know a trick for this ? Jeremias Maerki - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Mathieu Leplatre Météo France International GSM: +974 579 3608 Fax: +974 436 5086 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]