RE: cell number overflow
I played around with fop-versions, a little bit: - 0.20: works fine (as stated, originally) - 0.93: works, but looks totally ugly - 0.94: doesn't work at all (index out of bounds) - 0.95: works after fixing stylesheet, but rendered content is too large Conclusion: always bundle a stylesheet with its fop-version. Never try to change fop-version. -- View this message in context: http://www.nabble.com/cell-number-overflow-tp21790992p21849198.html Sent from the FOP - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: cell number overflow
Hi, Li, Hao wrote: FOP 0.93 and 0.94 may just give the warning below and continue to render: WARNING: There are fewer table-columns than are needed. Column 5 was accessed, b ut only 4 columns have been defined. The last defined column will be reused. (fo :table, location: 23/245) Like you noticed this wasn’t working properly. FOP 0.95 must have changed a lot. Would not it be nice not to throw an exception? No, otherwise we can’t offer the ‘speed’ option like I explained in my earlier message. Since 0.95 has done a lot work to process tables without the table-column definition, it appears that this case can be handled better. How do you think it should be handled? It would also be nice that column definitions doesn't have to be strictly limited to all columns but just the few columns that user wants. For example, if I only want column#2 to be 200px wide, then I will define only column#2. Other columns will be equally spaced. You can do that. FOP will fill the holes with default columns, whose widths will be set to proportional-column-width(1). You just have to explicitly specify a table-column element for the last column, so that the number of columns can be obtained. For example: fo:table table-layout=fixed width=100% fo:table-column column-number=2 column-width=3cm/ fo:table-column column-number=5 column-width=proportional-column-width(1)/ fo:table-body ... This is a table with 5 columns, all of the same width except column number 2 that will be 3cm wide. What I should have added in my earlier answer is that if you don’t put table-column elements at all, then it’s as if you specified them all with proportional-column-width(1). If you need different widths for some columns, then you have to explicitly specify them. Another issue we noticed is that table-cell can not take percentage, only table-column can do it. Setting width on table-cell elements isn’t properly supported yet. Percentage is always preferred because the table may be nested thus does not necessarily take up all the width of a page. But if the above case occurs, the table won't even be rendered. thanks, Hao Vincent - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
RE: Using draft images with fop, and catalogs.
I don't particularly want to use base. Up to now I've been the only person here using FOP. I have my own local paths hard-coded into various batch and configuration files I'm using. I am now trying to rearrange my project so other members of my team might use it. They may have some of the files at different places locally. What I want to do is minimize the number of different places they need to insert their own paths. And using the Catalog mechanism seems like a useful way of collecting together this type of information, at least as far as the two main Java programs (Saxon and Fop) are concerned. I am now using Saxon in this way and would like, if possible, to use Fop likewise. Over on the docbook-apps list Bob Stayton has advised me that there is some way of doing this in Fop. I'd apprecitate it if anyone could post an example of how to modify fop.bat to get this sort of functionality. Appreciatively, Richard. -Original Message- From: Andreas Delmelle [mailto:andreas.delme...@telenet.be] Sent: 04 February 2009 17:40 To: fop-users@xmlgraphics.apache.org Subject: Re: Using draft images with fop, and catalogs. On 04 Feb 2009, at 18:21, Kerry, Richard wrote: Hi snip / I notice that at the moment the filename value appears in the FO file in the form url(images/drft.png) when I set draft.watermark.image to images/draft.png in my custom xsl file. Thus I presume that the stylesheet is just copying over the parameter value and putting it in url(). Correct. Can someone advise how to go about doing this. Do I need to tell the XSL stylesheet to change the format of what it inserts in the FO ? Or do I need to tell FOP that it's a URL/URI and to use the resolver ? Nothing special to do with the stylesheet, URIResolvers or CatalogResolvers, IIC. FOP recognizes 'url(images/draft.png)' as a relative URI, but will resolve it using the current working directory as the base[*], unless you use a configuration file when running FOP. See also: http://xmlgraphics.apache.org/fop/0.95/configuration.html In short: if you use the configuration to set the 'base' option, that will be the base for all relative URIs encountered in the FO document. If you would set it to 'file:///C:/DocBook/docbook-xsl-1.74.0/' then you should get the same effect as specifying the absolute URI you started with. [*] Note: there is an open Bugzilla entry ( https://issues.apache.org/bugzilla/show_bug.cgi?id=46566 ) concerning resolution of font URLs, where it is mentioned that it would probably be better in line with the related RFC to use the base URI of the document/config file. All well and easy if that actually exists as a file somewhere. As soon as the XML only exists as a stream or a LOB on a database, this will be next to impossible. HTH! Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Using draft images with fop, and catalogs.
On 05 Feb 2009, at 15:51, Kerry, Richard wrote: I don't particularly want to use base. Up to now I've been the only person here using FOP. I have my own local paths hard-coded into various batch and configuration files I'm using. I am now trying to rearrange my project so other members of my team might use it. They may have some of the files at different places locally. Hmm, this seems precisely to be an argument in favor of configuring FOP to use a different base URL... Other users can resolve them using the base in their own particular context. What I want to do is minimize the number of different places they need to insert their own paths. And using the Catalog mechanism seems like a useful way of collecting together this type of information, at least as far as the two main Java programs (Saxon and Fop) are concerned. I am now using Saxon in this way and would like, if possible, to use Fop likewise. If you can resolve the complete URL at the XSLT stage, then it has nothing more to do with FOP. Note: you will then produce a FO document with absolute URIs, which is by definition no longer easily portable to other environments where the images may reside in different locations. Also, the question then becomes slightly off-topic for this list, and belongs on Saxon's user-list. That said, it never hurts to try it here. I'd dig in the archives, if I were you, since I'm almost certain that I have seen similar questions answered here in the past. At any rate, fop.bat uses no particular XSLT implementation, but just the one that is available at runtime. Maybe it's just a matter of setting a JAXP system property in the command-line all the way at the bottom of the script. Regards Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Using draft images with fop, and catalogs.
On 05 Feb 2009, at 20:12, Andreas Delmelle wrote: snip / That said, it never hurts to try it here. I'd dig in the archives, if I were you, since I'm almost certain that I have seen similar questions answered here in the past. Took the liberty of entering a search myself, and this one seems to contain some interesting pointers/links: http://markmail.org/search/?q=list%3Afop-users%20catalog%20resolver#query :list%3Afop-users%20catalog%20resolver+page:2+mid:i7nvi65adokdemxu+state:results Although they are more intended for embedded usage of FOP in another Java application,. they may give you /some/ idea. Unfortunately, I've never used catalogs myself, so if there's anyone around that has used them before (with FOP, from the command-line), it would be great if they chimed in. HTH! Andreas - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Using draft images with fop, and catalogs.
The problem is that the URIResolver is not wired into the command-line client, yet. Basically, we'd need to provide a command-line option similar to the -URIRESOLVER of Xalan-J's CLI: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xalan/xslt/Process.java?view=markup As you noticed, using URIResolvers in FOP from Java code is not problem anymore today. On 05.02.2009 20:34:08 Andreas Delmelle wrote: On 05 Feb 2009, at 20:12, Andreas Delmelle wrote: snip / That said, it never hurts to try it here. I'd dig in the archives, if I were you, since I'm almost certain that I have seen similar questions answered here in the past. Took the liberty of entering a search myself, and this one seems to contain some interesting pointers/links: http://markmail.org/search/?q=list%3Afop-users%20catalog%20resolver#query :list%3Afop-users%20catalog%20resolver+page:2+mid:i7nvi65adokdemxu+state:results Although they are more intended for embedded usage of FOP in another Java application,. they may give you /some/ idea. Unfortunately, I've never used catalogs myself, so if there's anyone around that has used them before (with FOP, from the command-line), it would be great if they chimed in. HTH! Andreas Jeremias Maerki - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org