Re: (Jay) RE: RE: Batik Extension/FOP problem
Jay Chiu wrote: Glen, The reason that the svg portion does not work in Batik Squiggle is because of the namespace. The embedded svg needs svg: prefix and probably batik: prefix for flowText elements. Attached please find a svg file that works in squiggle. I tried three different ways to embed it into a fo file. But all failed. The third example is the closest to being correct but you didn't define the batik namespace prefix you need to add: xmlns:batik=http://xml.apache.org/batik/ext; On the 'svg' element where you define the 'svg', and 'xlink' namespace prefixes. Have you tried splitting up the 'averylongrunnonword...'? This might be causing FOP problems since it isn't in it's dictionary. Here are the fop result: (1) embedding_flowtext.fo, with not svg:/batik: prefix FOP output: [INFO] 1.0dev [WARNING] Unknown formatting object ^svg [WARNING] Unknown formatting object ^title [WARNING] Unknown formatting object ^g [WARNING] Unknown formatting object ^text Process terminated with exit code 0 (2) embedding_flowtext1.fo with svg: prefix, without batik: prefix and embedding_flowtext2.txt with both svg: and batik: prefix FOP output: [INFO] 1.0dev [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! [ERROR] findHyphenPoss: problem! FOP program keeps print out this error. Never stop. Can you please tell me how to embed the svg into the fo file? Thanks a lot. Jay On Sun, 23 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote: Jay, I took your FO file and stripped out everything but the SVG portion (i.e., everything within fo:instream-foreign-object), and renamed the file test.svg. Next, I ran Batik's Squiggle SVG browser on this test.svg--I got the same undesired result within Squiggle--a yellow rectangle--as you got in the PDF document. So the problem does not appear to be with FOP--at least on this issue--but with either your SVG or with Batik. FOP uses Batik for SVG--if your SVG portion is not working with Batik/Squiggle, it won't work with FOP. Batik is another library, another team--I don't handle it. In this debugging, what I need next from you is an SVG file using Batik extension elements that runs fine in Squiggle, but when put within FOP fo:instream-foreign-object, won't run. If you can do that, then we can resume debugging within FOP. If you *can't* get there--i.e., Squiggle isn't doing anything with those extension elements--then you may need to start directing some questions to the Batik user list to find out what the problem is. Thanks, Glen Jay, I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not perfect--I noticed a hyphenation warning during running your sample fo document; also I ran one of the samples in the Batik directory (I embedded gears.svg into an FO document)--it *appears* to work, but several issues may appear on our side or Batik's that we will need to fix. Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main FOP page)--any problems you find, please add to Bugzilla, so we can get them fixed. (You'll find a Bugs link on the main FOP page.) Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com 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]
Re: (Jay) RE: RE: Batik Extension/FOP problem
Quite possibly. FOP does not appear ready for your needs at this time. Glen --- Jay Chiu [EMAIL PROTECTED] wrote: I have not seen the error [ERROR] findHyphenPoss: problem! in previous FOP versions. Could it be some recent change causing this problem? Thanks. Jay Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Sat, 13 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote: Jay, I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not perfect--I noticed a hyphenation warning during running your sample fo document; also I ran one of the samples in the Batik directory (I embedded gears.svg into an FO document)--it *appears* to work, but several issues may appear on our side or Batik's that we will need to fix. Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main FOP page)--any problems you find, please add to Bugzilla, so we can get them fixed. (You'll find a Bugs link on the main FOP page.) Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Re: Re: (Jay) RE: RE: Batik Extension/FOP problem
I think I got the same result you did. I'll look into the problem. Glen --- Jay Chiu [EMAIL PROTECTED] wrote: I got the hanging problem when I used command fop.bat xx.fo xx.pdf. However FOP does NOT hang, when I run it in IntelliJ. Probably it relates to the JDK classpath. But it seems the Batik extension still not working. I tried the attached .fo file. The generated pdf file does not have flowText sections. Can you give me your fo test file? Thank you very much. Jay Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Sat, 20 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote: Jay, Thanks for checking and sorry for the delay--Isabel took away my electricity for two days. Like Andreas, I didn't see the hanging you mentioned. Also, your error message was the hyphenation issue I mentioned below--those will occur, which I'm sadly not trained to fix right now--I'm on other issues at this moment. But thanks for mentioning them--Again, add problems you find to Bugzilla with a specific and as simplified example as possible--we'll get to them, it just may not be as soon as desired. Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Glen, Thank you for help. But the fop of cvs snapshot hangs on processing fo file. I tried today's packages, 20030919221605 and 20030919041528, untar'ed and ran build.bat to create fop.jar file on XP machine. Then I ran fop.bat on fo files to generate pdf. But it always hangs. It prints out [ERROR] findHyphenPoss: problem! on processing examples/fo/embedding.fo and examples\fo\advanced\giro.fo. Can you please check? Thanks a lot. Jay Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Sat, 13 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote: Jay, I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not perfect--I noticed a hyphenation warning during running your sample fo document; also I ran one of the samples in the Batik directory (I embedded gears.svg into an FO document)--it *appears* to work, but several issues may appear on our side or Batik's that we will need to fix. Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main FOP page)--any problems you find, please add to Bugzilla, so we can get them fixed. (You'll find a Bugs link on the main FOP page.) Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ATTACHMENT part 2 application/octet-stream ATTACHMENT part 3 application/pdf __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
RE: (Jay) RE: RE: Batik Extension/FOP problem
-Original Message- From: Jay Chiu [mailto:[EMAIL PROTECTED] Thank you for help. But the fop of cvs snapshot hangs on processing fo file. I tried today's packages, 20030919221605 and 20030919041528, untar'ed and ran build.bat to create fop.jar file on XP machine. Then I ran fop.bat on fo files to generate pdf. But it always hangs. It prints out [ERROR] findHyphenPoss: problem! on processing examples/fo/embedding.fo and examples\fo\advanced\giro.fo. Jay, I've just been running the same test ( examples/fo/advanced/giro.fo ) and received the same 'hyphenation errors'. ( on Mac OS X ) It didn't hang, however ( gave me an exception on a non-existing tiff - just removed the ref from the fo, parsed again and the operation finished ). Also, I've noticed that the logger-output from the dev-version is not completely finished ( so it would appear to hang at a certain point, but if you leave it running, it will finish... ) Glen, Could you shed some more light on this issue? Thanks. Greetz, Andreas
Re: (Jay) RE: RE: Batik Extension/FOP problem
Andreas L. Delmelle wrote: I've just been running the same test ( examples/fo/advanced/giro.fo ) and received the same 'hyphenation errors'. That's a known problem of the HEAD code. Are you sure you want to use this? J.Pietschmann
Re: (Jay) RE: RE: Batik Extension/FOP problem
If he's using the transcoder, he has no other choice (fortunately)--that's the only place where they are supported. Glen --- J.Pietschmann [EMAIL PROTECTED] wrote: Andreas L. Delmelle wrote: I've just been running the same test ( examples/fo/advanced/giro.fo ) and received the same 'hyphenation errors'. That's a known problem of the HEAD code. Are you sure you want to use this? J.Pietschmann __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Re: (Jay) RE: RE: Batik Extension/FOP problem
Jay, Thanks for checking and sorry for the delay--Isabel took away my electricity for two days. Like Andreas, I didn't see the hanging you mentioned. Also, your error message was the hyphenation issue I mentioned below--those will occur, which I'm sadly not trained to fix right now--I'm on other issues at this moment. But thanks for mentioning them--Again, add problems you find to Bugzilla with a specific and as simplified example as possible--we'll get to them, it just may not be as soon as desired. Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Glen, Thank you for help. But the fop of cvs snapshot hangs on processing fo file. I tried today's packages, 20030919221605 and 20030919041528, untar'ed and ran build.bat to create fop.jar file on XP machine. Then I ran fop.bat on fo files to generate pdf. But it always hangs. It prints out [ERROR] findHyphenPoss: problem! on processing examples/fo/embedding.fo and examples\fo\advanced\giro.fo. Can you please check? Thanks a lot. Jay Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Sat, 13 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote: Jay, I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not perfect--I noticed a hyphenation warning during running your sample fo document; also I ran one of the samples in the Batik directory (I embedded gears.svg into an FO document)--it *appears* to work, but several issues may appear on our side or Batik's that we will need to fix. Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main FOP page)--any problems you find, please add to Bugzilla, so we can get them fixed. (You'll find a Bugs link on the main FOP page.) Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
RE: (Jay) RE: RE: Batik Extension/FOP problem
-Original Message- From: Glen Mazza [mailto:[EMAIL PROTECTED] I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not Glen, I'm just being curious: did my remarks turn out to be helpful here? (I just want to check to what extent I'm beginning to understand the internals of the application...) Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main Have done so. Well, not the Batik extension element mapping in particular, but I had been embedding the maintenance version up to now. Switched it to 1.0dev and basic functionality seems to be A-OK. I've run into a few cases though where the maintenance version did its work just fine, but 1.0dev seems to be 'unfinished' - as mostly happens with nightly builds, I guess. I'm not sure which of these problems are already being worked on, and as I most certainly do not want to end up 'spamming' fop-dev with a bunch of pseudo-bugs, I'll just name a few here. If there's little insects crawling around in here you think I'd better report to Bugzilla, just let me know : 1. links ( internal external ) don't work: neither in my own documents, nor in the newlinktest.fo example that comes with FOP 2. background-color [? this might be working fine: I defined a bg-c for a table-body - now seems to disappear; works if I add them to table-cell instead of table-body - so could be that it now actually is working correctly by 'covering' the background of body with that of the cell... I still need to check the spec run a few tests to see whether this behaviour is compliant: CSS seems to silently presuppose that if no bg-c is explicitly defined, table-cell would inherit the value of its parent - in this case table-row, but as none was specified there either, one would expect it to be the color of table-body... ] 3. break-before -after seem to have no effect Read you later. Greetz, Andreas
RE: (Jay) RE: RE: Batik Extension/FOP problem
--- Andreas L. Delmelle [EMAIL PROTECTED] wrote: I'm just being curious: did my remarks turn out to be helpful here? (I just want to check to what extent I'm beginning to understand the internals of the application...) I was happy to see you going through the source code. Also welcome to the FOP-DEV list. Main issue is that we could not just switch from SVGDOMImplementation to ExtendedSVGDOMImplementation as Thomas (I believe) had thought. The latter is not really a superclass of the former--they're different sets of elements with different namespaces. (To that end, the superclass-subclass relationship of these two classes in the Batik code does not seem correct to me.) So I just added in one more ElementMapping subclass in the fo.extensions.svg package for the Batik Extension elements. I'm not sure which of these problems are already being worked on, and as I most certainly do not want to end up 'spamming' fop-dev with a bunch of pseudo-bugs Don't kill yourself here--the majority of 1.0 is still unimplemented. I was strictly more concerned about the Batik extensions working for this particular point. (For sanity retention, I try to narrow my concerns to one or two topics for each week.) CSS seems to silently presuppose that if no bg-c is explicitly defined, table-cell would inherit the value of its parent - in this case table-row, but as none was specified there either, one would expect it to be the color of table-body... ] Well, not everything is inherited in the XSL FO standard--http://www.w3.org/TR/xsl/slice7.html#background-color says bg-c is not inherited (but evidently can be if inherit is chosen as a value, so I'm not sure how FOP should handle this.) Glen __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
(Jay) RE: RE: Batik Extension/FOP problem
Jay, I added in a new Batik extension element mapping in our main trunk code--this should help you. It is not perfect--I noticed a hyphenation warning during running your sample fo document; also I ran one of the samples in the Batik directory (I embedded gears.svg into an FO document)--it *appears* to work, but several issues may appear on our side or Batik's that we will need to fix. Please test it out--wait 6 hours for a nightly snapshot to appear (see our Download link on the main FOP page)--any problems you find, please add to Bugzilla, so we can get them fixed. (You'll find a Bugs link on the main FOP page.) Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com
Re: RE: Batik Extension/FOP problem
1. This is an alternative way I try to solve the FOP absolute positoned block-container issue. 2. The FOP version is fop-0.20.5 with batik jar and tried with batik version 1.5. 3. As we have sent back and forth the question and answers so many times, can someone doing the SVG for FOP please take a look at my batik extension code and help me solve the problem? I hope someone know the details of both FOP and SVG may help me. I am affraid that FOP does not contain Batik extension because FOP developor did not feel it is easy to add. Thanks a lot. Jay Jihai Qiu wrote: The CCS engine for the document is set in BridgeContext.initializeDocument(), which is called by org.apache.batik.bridge.GVTBuilder.build(). But it seems there is no way to set CCS engine from FOP classes(such as BatikElement). (I do not want to modify Batik source code). It also appears that you are trying to map just the flowText element. For the svg elements, FOP extension maps svg to SVGElement and all other tags to SVGObj. I am using the same approach for batik extensions: flowText to BatikElement and all other tags to BatikObj. BatikElement creates the root document for batik namespace. You can't really render an SVG document as a bunch of disconnected pieces. If this *is* related to the 'absolute positioned block-container' issue, I think the SVG approach, in this case, might be complicating matters unnecessarily (though I must admit, it might seem the only viable alternative right now, apart from somehow 'preprocessing' your fo to make it contain 'exact' coordinates where needed...) The SVG specification is pretty clear that SVG elements must have a parent SVG element It seems Batik requires each child of SVG element must be SVG element( or belongs to same document). svg Batik DOM element is created through SVGDOMImplmentation, while flowText Batik DOM element is created through ExtensibleSVGOMImplementation. I have to have a different root document for all the batik extension elements, otherwise the system uses SVGDOMImplementation to create generic DOM element. It sounds like you want to make a small change so FOP uses the ExensibleSVGDOMImplementation instead of SVGDOMImplementation for all the elements. I think you really want to try and fix the existing SVG element mapping stuff in FOP. How to do this? I stuck in this problem now and do not know what to do the next. Can someone please help me implement this batik extension in FOP? I don't think you can really fix this without making changes in FOP. It looks like you might be able to just change the init method in SVGElement. Just to be on the safe side: in the meantime, we still don't know which version(s) of batik/fop are being used here... ;) but apart from that, if the ExtensibleSVGDOMImplementation behaves completely the same way... this might be worth a little patch. The svg-embedding example coming with FOP works if you make this change. ( to FOP 0.20.5 release ) Greetz, Andreas Delmelle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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]
RE: RE: Batik Extension/FOP problem
Jay, Please type this up in Bugzilla so we don't forget it. (http://xml.apache.org/fop/bugs.html)--Also include this sample as an attachment to the bug. No time guarantees can be given, however. In the meantime, Thomas, I don't think I can just switch our SVGElementMapping implementation from SVGDOMImplementation to ExtensibleSVGDOMImplementation because the namespaces are different. I'll need to add another ElementMapping to production and development. *But*, as you can see in our SVGElementMapping implementation, we rely on a constant SVGDOMImplementation.SVG_NAMESPACE_URI. File below: http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java?rev=1.1content-type=text/vnd.viewcvs-markup To facilitate this change, could you create a similar--of whatever name--namespace constant in your ExtensibleSVGDOMImplementation class--probably it should be http://xml.apache.org/batik/ext;. Thanks, Glen --- Jay Chiu [EMAIL PROTECTED] wrote: Attached please find a sample fo file with embedded svg object. You may also take a look at the batik samples, xml-batik/samples/extensions/flow/flowtext.svg FOP does support the base SVG 1.1 funcationality as Batik supports. But SVG 1.1 does not support more flexible text feature, such as text can not wrap onto multiple lines. --- Thomas DeWeese [EMAIL PROTECTED] wrote: I have to have a different root document for all the batik extension elements, otherwise the system uses SVGDOMImplementation to create generic DOM element. It sounds like you want to make a small change so FOP uses the ExensibleSVGDOMImplementation instead of SVGDOMImplementation for all the elements. __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]