RE: Is it ok to have NullPointerException while running build's examples target for fop 0.94?
Could that be fixed? I think I had similar problems with 0.93, but thought GIFs were fixed already in 0.94. In resulting PDF I could see normally all JPEG/PNG/TIFF images, but not GIFs L. I just tried it (both with the examples-target and with the fop command) and it worked for me on both ways. How are you running it? Which Java version are you using? I'm running Ant build from inside my Eclipse 3.1 framework with JDK 1.3.1. Could you please run the image.fo example with the fop command. Why that should be different in comparison with Ant build run, especially having all other graphics correct in resulting images.pdf? Andrejus
Is it ok to have NullPointerException while running build's examples target for fop 0.94?
Hi, I've made checkout of fop 0.94 branch and while running examples target from build, get this: [fop] D:\eclipse\test\fop-0_94\examples\fo\basic\images.fo - D:\eclipse\test\fop-0_94\build\examples\images.pdf [fop] [ERROR] AbstractFopImage - Error while loading image (Gif): null java.lang.NullPointerExceptionjava.lang.NullPointerException [fop] at sun.awt.image.URLImageSource.init(URLImageSource.java:43) [fop] at sun.awt.image.URLImageSource.init(URLImageSource.java:78) [fop] at sun.awt.image.URLImageSource.init(URLImageSource.java:83) [fop] at sun.net.www.content.image.gif.getContent(gif.java:44) [fop] at java.net.URLConnection.getContent(URLConnection.java:590) [fop] at org.apache.fop.image.GifImage.loadBitmap(GifImage.java:66) [fop] at org.apache.fop.image.AbstractFopImage.load(AbstractFopImage.java:169) [fop] at org.apache.fop.render.pdf.PDFRenderer.putImage(PDFRenderer.java:1721) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderImage(PDFRenderer.java:1652) [fop] at org.apache.fop.render.AbstractRenderer.renderViewport(AbstractRenderer.java: 748) [fop] at org.apache.fop.render.AbstractPathOrientedRenderer.renderViewport(AbstractPa thOrientedRenderer.java:541) [fop] at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.jav a(Compiled Code)) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderInlineArea(PDFRenderer.java(Comp iled Code)) [fop] at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java: 606) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderLineArea(PDFRenderer.java:1307) [fop] at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:53 2) [fop] at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582 ) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300) [fop] at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:52 2) [fop] at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:582 ) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderBlock(PDFRenderer.java:1300) [fop] at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:52 2) [fop] at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:427) [fop] at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer. java:406) [fop] at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.jav a:340) [fop] at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer .java:285) [fop] at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java :258) [fop] at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:232) [fop] at org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:757) [fop] at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:120) [fop] at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLa youtManager.java:424) [fop] at org.apache.fop.layoutmgr.PageSequenceLayoutManager.makeNewPage(PageSequenceL ayoutManager.java:377) [fop] at org.apache.fop.layoutmgr.PageBreaker.handleBreakTrait(PageBreaker.java:492) [fop] at org.apache.fop.layoutmgr.PageBreaker.startPart(PageBreaker.java:398) [fop] at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:420) [fop] at org.apache.fop.layoutmgr.AbstractBreaker.addAreas(AbstractBreaker.java:370) [fop] at org.apache.fop.layoutmgr.PageBreaker.doPhase3(PageBreaker.java:262) [fop] at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:345) [fop] at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263) [fop] at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequen ceLayoutManager.java:144) [fop] at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:233 ) [fop] at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:145) [fop] at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java: 378) [fop] at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194) [fop] at org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerI dentityImpl.java:1101) [fop] at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) [fop] at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) [fop] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc her.dispatch(Unknown Source)(Compiled Code) [fop] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
RE: Bounty for auto table layout?
I'm 99.9% sure that it would not. There were discussions about that in the past and the members' opinion was to keep such things separate from the ASF. The ASF would never pay anyone to make an improvement on one of the projects since it's a NPO and there are certain rules around that status. That's true, we have a guard of great volunteers for such projects, who don't expect to be paid for their job. Though on other side I'd be very interested if such so needed enhancement could be done more quickly (i.e. not related on someone afterhours unsleeping nights). Some time ago I've tried to dig a little into those Layouts techniques, but quickly found that it's not the thing I could enhance myself easily (though it was some initial information provided by Jeremias and Simon and maybe others, but still not easy to understand without UML graphs of pieces interaction), so stayed mostly with work on various XSL/XML parts for my projects needs and left those FO things for real experts :). So, for summary, I could also sponsor additional $100 (if anybody care, Vincent?) to make things happen more quickly, but project status should not change due to that and such sponsor approach should be only on volunteer basis as well. Just some additional thoughts on that. Regards, Andrejus
Is that correct jar in SVN: xmlgraphics-commons-1.2svn.jar?
Hi, Just wonder if that svn suffix in jar name for xmlgraphics-commons-1.2svn.jar is correct. I could see it under trunk lib directory. I think that previously we had just xmlgraphics-commons-1.1.jar Andrejus
What is the current partial implementation status of vertical-align for table cells?
Hi, I've tried to use this table cell constraint with fop-trunk: fo:table-cell border-style=solid border-width=1px vertical-align=bottom fo:block text-align=start vertical-align=bottom fo:inline vertical-align=bottom font-weight=normal font-style=normal font-family=Tahomamy text/fo:inline /fo:block /fo:table-cell But can't get my text aligned at the bottom of that table cell. Should I use anything else instead or it's not supported at the moment? Thank you, Andrejus
RE: What is the current partial implementation status of vertical-align for table cells?
Hi Chris, Thanks a lot for your quick answer. Sometimes it's hard to tell where your question is more suitable to be posted, especially if someone works from dev team works right now on that feature implementation and checks this list more often than another. I would probably also not post here today, but can't make last fop-trunk examples to be build after last SVN updates due to this: examples: [fop] [INFO] FopFactory - Source resolution set to: 72.0dpi (px2mm=0.3528) [fop] [INFO] FopFactory - Default page-height set to: 11in [fop] [INFO] FopFactory - Default page-width set to: 8.26in [fop] D:\eclipse\test\fop_trunk\examples\fo\basic\alignment.fo - D:\eclipse\test\fop_trunk\build\examples\alignment.pdf [fop] [INFO] FopFactory - base set to: file:/D:/eclipse/test/fop_trunk/./ [fop] [INFO] FOP - Target resolution set to: 72.0dpi (px2mm=0.3528) BUILD FAILED java.lang.Error: Unresolved compilation problem: Total time: 9 seconds As you could see I have very informative Ant output (probably due to my setup or anything else I don't know right now) :) I need to deal with. Once again - thanks for quick help! Andrejus -Original Message- From: Chris Bowditch [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 30, 2007 3:49 PM To: fop-dev@xmlgraphics.apache.org Subject: Re: What is the current partial implementation status of vertical-align for table cells? Andrejus Chaliapinas wrote: Hi, I've tried to use this table cell constraint with fop-trunk: vertical-align is a shorthand for several FO properties including display-align. I don't believe display-align is properly assigned when using vertical-align. Try using display-align directly instead. fo:table-cell border-style=solid border-width=1px vertical-align=bottom fo:block text-align=start vertical-align=bottom fo:inline vertical-align=bottom font-weight=normal font- style=normal font-family=Tahomamy text/fo:inline /fo:block /fo:table-cell But can't get my text aligned at the bottom of that table cell. Should I use anything else instead or it's not supported at the moment? In the future, please post this sort of question on the fop-user mailing list. This list is meant for discussing the java internals of FOP. Thanks, Chris
Need some help on one particular FOTreeBuilder URI mismatch warning (v0.92beta)
Hi, I'm trying to process XML file by applying XSl stylesheet to it and using such constraint inside that XSL: xsl:copy-of select=xalan:nodeset(ext:generateDynamicNodes()) / My Java method generateDynamicNodes by itself generates NodeList understandable by xalan in form like fo:block.../fo:block. Now when I run everything together during transformation I get this warning: org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java: 373) WARN: Mismatch: block (http://www.w3.org/1999/XSL/Format) vs. block () Where should I additionally specify that URI to match? I've tried this syntax as well without any luck: xsl:copy-of xmlns:fo=http://www.w3.org/1999/XSL/Format; select=xalan:nodeset(ext:generateDynamicNodes()) / Any help would be appreciated. Andrejus
RE: Could I prepare font metrics file for a font like Webdings (i.e. without Unicode cmap table inside)?
When I run TTFReader (from 0.92 beta) over Webdings.ttf - I get this output: Parsing font... Reading c:\windows\fonts\webdings.ttf... Number of glyphs in font: 227 2 cmap tables Unicode cmap table not present Unsupported format: Aborting Question - is it possible then to prepare metrics file for this font as well in the same way as for let say Arial? You can try to use the -enc ansi switch and see if it helps. Same result :( Any other thoughts? Andrejus
RE: Any thoughts on something like fo:tab support?
Jeremias, You can also place your wish/requirement for tabs there so it can be considered for XSL-FO 2.0. Just be prepared that they may wrinkle their noses. [1] http://lists.w3.org/Archives/Public/xsl-editors/ Thank you for pointing there. I'll try to post my feature request. Is it? I'm not so sure. You can view it this way: What HTML/CSS is for the browser, XSL-FO is for the paper. XSL-FO is even reusing many aspects of CSS which says a lot. That reuse was in my mind when I've checked that old document called Tab Stops for CSS dated of 1997: http://www.w3.org/People/howcome/t/970224HTMLERB-CSS/WD-tabs-970117.html Don't know though what happened later. Thank you very much for your help! Andrejus
RE: Any thoughts on something like fo:tab support?
Andreas, Thanks a lot for your XSL sample. I'll try to play around it during upcoming week. Quick test on it so far showed me that line 3 from my original sample: ++++ blabla: text3 after 2 tabs and this XML corresponding to it: par blabla: tab / tab / text3 after 2 tabs /par was converted to: fo:table-row fo:table-cell number-columns-spanned=2 column-number=1 fo:blockblabla:/fo:block /fo:table-cell fo:table-cell number-columns-spanned=8 column-number=2 fo:blocktext3 after 2 tabs/fo:block /fo:table-cell /fo:table-row though I think number-columns-spanned should be equal 3 for the label part and column-number equal 3 for text part in this case. Anyway, this is really good basis to extend/enhance. Now I have a lot of work ahead on this. Andrejus
RE: Any thoughts on something like fo:tab support?
Andreas, Can you show us the non-transformed source nodes for those lines? The tab-stops, I presume, correspond to some marker in the source XML (a tab character?). Here is how that corresponding to my sample XML looks like: par blabla: tab / text1 after one tab /par par blablabla: tab / text2 after one tab /par par blabla: tab / tab / text3 after 2 tabs /par par tab / blabla: tab / text4 when one tab exists before label and another it /par par tab / blabla: tab / text5 first line break / text6 second line break / text7 third line /par par means here new paragraph, so it's easy to convert it to fo:block or fo:inline tab means default tab stop, so following text should be positioned at the nearest 0.5 inch position break means line break inside paragraph (like shift+enter in text editors) Hope this could help for thinking - I'll really appreaciate that from you actually. Maybe you could show me another XSL sample, in which second line of my sample 'blablabla:' occupies not just first cell but also part of second cell in the row and then you put some calculated space somehow before text will start. Thank you. Andrejus
Any thoughts on something like fo:tab support?
Hi, Sorry, I was very busy with other stuff to work on table auto layout (plan to return to that next week), but right now another additional issue is bothering me - how could I have simple enter form (in which you have column of labels and column of aligned input fields) converted? I saw already suggestion of using table for that purposes, but it's not suitable for my situation, cause I'd like in this case to have mostly one row of such table independent from another and making such calculations a little bit ahead is difficult. So, I have proposal (please correct me if it's already decided on similar one what to do) to implement something like fo:tab tag, which will at the first stage of implementation work mostly like fo:leader, but with additional knowledge of what is the default tab step is and will calculate where is nearest tab stop should be placed based on the text block sizes under processing. Does it make sense in terms of FOP at all? Any help would be appreciated. Andrejus
RE: Do we have Area Tree construction also via getNextKnuthElements methods or mostly via addAreas?
Andrejus, I think it's best if you read all the threads here on fop-dev on auto table layout during August if have not already done so. They contain a lot of information about the next steps for the auto table layout and what has been discussed so far. Ok, thank you for pointing to right place as well as for additional comments on LMs. Will try my best during upcoming week. Andrejus
RE: Do we have Area Tree construction also via getNextKnuthElements methods or mostly via addAreas?
J.Pietschmann wrote: Simon Pepping wrote: No UML diagrams for FOP available. Would be nice though. As soon as I get some spare time, I'll try http://sourceforge.net/projects/umldot I suspect the diagrams to be somewhat unwieldy. J.Pietschmann I think that is not good choice for genetaring UML diags, while http://sourceforge.net/projects/umldot is in version 0.1.0 and no screeenshot. On sourceforge are plenty of abondoned or too new projects to be usable. Have you tried to use EclipseUML (http://eclipse-plugins.2y.net/eclipse/plugin_details.jsp?id=151)? But again - if someone could write some detailed doc on those LMs interactions (I don't see that now in design documents) - I could try and generate then those myself. Andrejus
Do we have Area Tree construction also via getNextKnuthElements methods or mostly via addAreas?
Hi, I'm trying to understand why in Patrick's code, when he deals with Table auto layout feature, after TableContentLayoutManager over current TableLayoutManager is prepared and processed with required columns shrinking/extra space distribution - there is another TableContentLayoutManager creation (yes, this was already commeted by Jeremias as no go approach)? Is it because something in Area Tree (some part of its graph) needs to be reevaluated once more (due to changed column width/columnMins/anything else)? If I comment second construction - then auto table layout testcase (yes Manuel, that's why I was focused on them) fails due to incorrect IPDA value for the first block presence in resulted area tree xml file. Any help would be appreciated. I think it would be great if we could have UML sequence diagram for those LM invocations/dependencies during some general table processing. Andrejus
Question on protected Logger member in some classes
Hi, While trying to debug some changes I've made wtih layout managers I've noticed that some classes have Logger as protected but not private member? What is the rationale here - just easy later inheritance of logger or anything else? For me it seems that logger purpose is to exactly identify the class, which makes some output and thus shown by name and not see some parent class name in output. What do you think? How about changing that current protected to private? Thank you, Andrejus
RE: Question on protected Logger member in some classes
You're right. These protected variables are sometimes not ideal. If you change anything to private while you work on the code, that's fine for me. Could you apply this patch to trunk? http://issues.apache.org/bugzilla/attachment.cgi?id=18956 Andrejus
RE: Question on protected Logger member in some classes
If anyone else can do that in the meantime, that would be great. There are other patches also waiting to be processed. Probably you are the only man who could do that. There were no responses for last 4 hours. Hopefully tomorrow. Andrejus
RE: Where could I read more about ipd/ipda/bpd/bpda values calculation?
Hi Manuel, unfortunately for the purpose of understanding the area tree, the terminology, and the geometry the XSL-FO specification is your best friend Yes, I've heard that before. Hope that support/extensive documentation will grow up later. It's usually the case with dynamically progressing projects. I don't quite understand hwy you are so focused on the test cases. A test case is exactly that - it tests a specific piece of functionality. I'm not so focused on them as it may seems, but good (and clear) test case always helps me in my development life to kind of summarize what is achieved so far. Due to my only initail involvement phase in FOP development - clear test run (when you don't get warnings regarding feature is not implemented, while you are running applied patch for that exactly feature) is a must for me to see if project development (and test cases are part of that) just follows some usual best practices and doesn't contain a lot of incompleteness/half-of-way code. So we are getting back to the start. You need to understand what the area tree is suppose to look like for the feature you want to test. Then you can write the checks for the particular testcase. Yes, will exactly do that now via everything I could find on that topic on the Web. Will ask more reasonable questions later. Andrejus
Newbie question on Area Tree XML and testcases
Hello, I'm trying a little bit understand FOP dev. internals and please correct me if I wrong. When I run Junit layout testcase - it generates me under test-results some XML file in form of Area Tree XML, from which I could produce PDF file. But for me it's not clear how I would know in advance which values should I place into testcase file to be checked during test run. BTW - do you currently still support Junit v3.8.2 to be run with JDK 1.3.x? Or you've already switched to Junit 4.1? Thank you for anyone who will get me more light on this. Andrejus
RE: Newbie question on Area Tree XML and testcases
Normally, I just construct the FO part in the test case and then run the thing once so I get the current area tree XML. I obviously get an error if I have no checks, because we don't want any test cases without checks. When I have a first area tree XML I create the first checks I can build. I don't have to have every check there from the beginning. I add more checks as I progress with the implementation/fix. So, while this is a test-first approach, it is not necessarily also a all-checks-first approach. :-) The test case grows with you. ;-) But if you first construct FO part and run testcase without any checks - how you could be sure that produced Area Tree is correct? And if then later want to expand your FO part - do you need again remove all checks, run your testcase, get new Area Tree and return checks back with additional ones? Sorry, I don't get it right now. Also I've noticed that in LayoutEngineTestSuite class there is such call: new File(test/layoutengine/disabled-testcase2filename.xsl) and my Eclipse Ant hangs on that, cause tries to prefix that name with current eclipse directory (d:\eclipse in my case) and not with actual basedir of my project. So my proposal would be (of cause if I don't miss any other setting somewhere) to change a little main build.xml file and have instead of this part: target name=junit-layout-standard depends=junit-compile if=junit.present description=Runs FOP's standard JUnit layout tests echo message=Running standard layout engine tests ${basedir}/ junit haltonfailure=${junit.haltonfailure} fork=${junit.fork} errorproperty=fop.junit.error failureproperty=fop.junit.failure this one (with basedir specified for junit invocation): target name=junit-layout-standard depends=junit-compile if=junit.present description=Runs FOP's standard JUnit layout tests echo message=Running standard layout engine tests ${basedir}/ junit dir=${basedir} haltonfailure=${junit.haltonfailure} fork=${junit.fork} errorproperty=fop.junit.error failureproperty=fop.junit.failure In that case it runs normally in my environment.
RE: Newbie question on Area Tree XML and testcases
Andrejus, I've created a project on sourceforge to generate pdf reports from JUnit tests. It's called JUnit PDF Report, an can be found here: http://junitpdfreport.sourceforge.net It uses FOP to render the JUnit XML docs into a PDF. Regards, Jan Great, What about next step taking it inside same FOP Ant build process with one additional target for that (testcases-into-pdf)? It's quite native to be there as well (via fop.bat you just run: fop -atin infile -pdf outfile). What do you think? I always prefer to have everything for whole build process in one place (in this case great Eclipse IDE). Andrejus
RE: Newbie question on Area Tree XML and testcases
Are you not running the org.apache.fop.layoutengine.LayoutEngineTestSuite using Eclipse's own JUnit support? That's the easiest way. Choosing the default working directory, everything works fine and you really only run the tests you need. It seems to me you're running the junit tasks from within Eclipse. I have different JDK installed in different places and configured them for my Eclipse (which also uses different workspaces for different things as well). I also have separate Junit 3.8.2 actually outside Eclipse. So, in that sense it's not always default values/settings are involved. I'll look into that. Hopefully I don't bother you a lot ;) Andrejus