Thomas, Thank you.
I develop xslt files on xp using XMLSpy and fop.bat. But the real application is on Solaris 8 using fop.sh. We actually treat the text as within a text area and we position the text area. In other words, it is just to map html <div> section to <svg:text> section. We thus have problem to use the same x/y coordinates for svg:text section. I really got too many problems with FOP. I think I made wrong decision to use FO approach for a real application. Other small fop errors I got are: (1) if the table cell width is too small, fop crash (2) if the number table columns used is greater than the number of columns defined, FOP stops with ERROR: NULL on XP and ERROR: -2 on Solaris, but without real error reason. Sorry I keep bothering you guys. And thank you for always response to my emails. Jay ---- On Tue, 14 Oct 2003, Thomas DeWeese ([EMAIL PROTECTED]) wrote: > Jay Chiu wrote: > > Thomas, > > > > Thank you for response. > > > > I am not sure the version of Batik. The modified date for the > > directories under xml-batik is 7/24/2003. But fop version is > > 0.20.5. > > > The major issue is FOP should not hang if the embedded svg > > references an unfound image. > > Agreed, however I suspect that part is a FOP issue, you > may want to try the trunk this will (if nothing else) put > you in a position to make use of any fixes they can provide. > > As a side note I noticed you reference FOP.sh are you > running this on Windows (cygwin) or UNIX. I have noticed > that FOP hangs quite a bit for me when I use FOP.sh with > cygwin and never when I use fop.bat. Cygwin does not seem > to play well with java. > > > Actually the generated pdf file is > > fine. ( We have a gui and a batch reporting application to > > generate pdf file. User may mistakely reference to some wrong > > file. But once fop.sh hangs, user can not continue to use GUI or > > run batch job). > > Not that it's particularly relevant here, but this seems like a > problem to me beyond any issues with FOP. > > > As for the text position, SVG 1.1 spec does not mention the X,Y > > coordinates are the base line position. If you choose x/y as > > base line position, it is very difficult to position the text > > field, because the font size change may cause the starting > > position change and thus may cause overlap. > > I think you need to read your copy of the SVG specification > a lot closer if you want to generate content. In particular it > has a rather large section on how text is laid out in SVG in > particular the handing of baselines. > > As to why text is laid out on the baseline and not by the > upper left corner, the answer is: because this is the only > sane way to layout text _especially_ when you can have the > font size change. What I can't understand is why you think > that specifying text by the top corner avoids overlap when > the font size changes? > > To do text layout properly you need to know a lot about > the font you are working on, having to know the ascent of > the font is likely the least of your concerns. > > > > > Thanks. > > > > Jay > > > > > > > > > > ---- On Mon, 13 Oct 2003, Thomas DeWeese > > ([EMAIL PROTECTED]) wrote: > > > > > >>Hi Jay, > >> > >> I added Batik-users to the CC list as it seemed many of > > > > your > > > >>questions are really SVG/Batik questions. > >> > >>Jay Chiu wrote: > >> > >> > >>>I have tried to embed a svg into a fo file to generate pdf > > > > file. > > > >>>The svg contains a reference to an image that can not be > > > > found. > > > >>>I got fop hanging problem. I hope Batik team to coordinate > > > > with > > > >>>FOP team to solve this issue for me. > >>> > >>>Attached please find the test svg file, fo file and > > > > generated > > > >>>pdf file. > >>> > >>>Here are the descriptions of the issues: > >>>(1) SVG side: > >>>(a) If I open the testimage.svg in Squiggle GUI, the GUI > > > > shows > > > >>>the SVG error null with the stack: > >>>java.lang.NullPointerException > >> > >> What version? With current CVS and squiggle I get: > >> > >>file:[...]/textimage.svg:7 > >>An I/O error occurred while processing the URI > >>'file:[...]/unfound.jpg' specified on the element <image> > >> > >>>(b) A text element with x=0, y=0 is not displayed from > > > > (0,0) > > > >>>position. It can not be found on the image. Is this right > >>>behaviors? > >> > >> Actually if you look _very_ closely you can see a little > > > > bit > > > >>of the 'p' at the top of the image. 0,0 establishes the > > > > baseline > > > >>for the text, for most languages the text sits 'on top' of > > > > this line. > > > >>So in this case most of your text is off the top of the page. > >>If you move that line down a little to say: 0,10. You can see > > > > all > > > >>of it. So yes this is the right behavior. > >> > >> You can also tell batik what section of the infinite > > > > canvas to > > > >>render by setting the 'viewBox' attribute on the SVG element. > >> > >> > >>>(2) FOP side > >>>FOP successfully generated the pdf file(as generated), but > > > > it > > > >>>hangs in cleanup. The output of Fop.bat is: > >>>C:\apps>fop-0.20.5\fop.bat textimage.fo textimage.pdf > >>>[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 > > > > Parser > > > >>>[INFO] FOP 0.20.5 > >>>[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 > > > > Parser > > > >>>[INFO] building formatting object tree > >>>[INFO] setting up fonts > >>>[INFO] [1] > >>>[INFO] Parsing of document complete, stopping renderer > >>> > >>>Thanks a lot. > >>> > >>>Jay > >>> > >>>________________________________________________ > >>>Get your own "800" number > >>>Voicemail, fax, email, and a lot more > >>>http://www.ureach.com/reg/tag > >> > >> > >> > >> > >> > > > > > > ________________________________________________ > > Get your own "800" number > > Voicemail, fax, email, and a lot more > > http://www.ureach.com/reg/tag > > > > > > > ________________________________________________ Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]