Re: FOP Interfaces
Thanks Jeremias --- Jeremias Maerki <[EMAIL PROTECTED]> a écrit : > I get it now, thanks. I think that's an interesting > thing. Definitely, > worth putting on the task list. I could use > something like that, too. > > > I would like to know where an arbitrary event has > > occured during fop rendering. Let me give you a > short > > example: > > i produce a *big* pdf with fop that should include > > another pdf that was produced in another way (i my > > case, it was produced by distiller from a word > > document). That document should be included after > a > > ... that is somewhere inside > my > > document. > > Second example : i want to watermark some specific > > pages according to the content that is on these > pages. > > For that purpose, i use iText. > > So what i want is some kind of mechanism (for > exemple > > something like ) that > > would enable me to get an Hashtable that contains > the > > page where this event has occured. After getting > this > > hashtable, i could run iText-based process to > finish > > my pdf. > > Is that more clear? Excuse me for my > > not-that-good-english, i have also to admit that > it > > was not that clear in my head. > > Cheers, > Jeremias Märki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 41 317 2029 > Internet http://www.outline.ch > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
I get it now, thanks. I think that's an interesting thing. Definitely, worth putting on the task list. I could use something like that, too. > I would like to know where an arbitrary event has > occured during fop rendering. Let me give you a short > example: > i produce a *big* pdf with fop that should include > another pdf that was produced in another way (i my > case, it was produced by distiller from a word > document). That document should be included after a > ... that is somewhere inside my > document. > Second example : i want to watermark some specific > pages according to the content that is on these pages. > For that purpose, i use iText. > So what i want is some kind of mechanism (for exemple > something like ) that > would enable me to get an Hashtable that contains the > page where this event has occured. After getting this > hashtable, i could run iText-based process to finish > my pdf. > Is that more clear? Excuse me for my > not-that-good-english, i have also to admit that it > was not that clear in my head. Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
Hi Jeremias, and all other peoples here, I would like to know where an arbitrary event has occured during fop rendering. Let me give you a short example: i produce a *big* pdf with fop that should include another pdf that was produced in another way (i my case, it was produced by distiller from a word document). That document should be included after a ... that is somewhere inside my document. Second example : i want to watermark some specific pages according to the content that is on these pages. For that purpose, i use iText. So what i want is some kind of mechanism (for exemple something like ) that would enable me to get an Hashtable that contains the page where this event has occured. After getting this hashtable, i could run iText-based process to finish my pdf. Is that more clear? Excuse me for my not-that-good-english, i have also to admit that it was not that clear in my head. Thanks, Fred. --- Jeremias Maerki <[EMAIL PROTECTED]> a écrit : > Do you just want to know how many pages were > rendered (See > Driver.getResults().getPageCount()) or do you want > to insert PDF pages > of your own while FOP is rendering? Or something > else, because I think I > don't undertand, yet, what you want? > > > I would *love* to be able to be able to get the > page > > number where some event append (for example by > stating > > in .fo source) cause it would > > greatly improve fop/itext interfacing. I > personnaly > > use fop to render most of my content but i finish > the > > work using itext (to watermark content, reorganize > > pages to produce booklets, insert some annexes > written > > in pdf .. etc) > > Thanks a lot, whether you implement that or not! > > Cheers, > Jeremias Märki > > mailto:[EMAIL PROTECTED] > > OUTLINE AG > Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern > Tel. +41 41 317 2020 - Fax +41 41 317 2029 > Internet http://www.outline.ch > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
Do you just want to know how many pages were rendered (See Driver.getResults().getPageCount()) or do you want to insert PDF pages of your own while FOP is rendering? Or something else, because I think I don't undertand, yet, what you want? > I would *love* to be able to be able to get the page > number where some event append (for example by stating > in .fo source) cause it would > greatly improve fop/itext interfacing. I personnaly > use fop to render most of my content but i finish the > work using itext (to watermark content, reorganize > pages to produce booklets, insert some annexes written > in pdf .. etc) > Thanks a lot, whether you implement that or not! Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
> > Output from FOP: > > - Generation statistics: Number of pages total > What about: > total=((Integer)processor.getAttribute("fop.totalNumberOfPages")).intValue() > (Returns 0 before rendering, i suppose. Or is throwing an exception > better?) > > > Number of pages of each page-sequence > Uh, perhaps > >pgsq2=((Integer)((Vector)processor.getAttribute("fop.pagesInSequence")).get(2)).intValue() > or (less recommended but may get more resonance) > pgsq2=((Integer)processor.getAttribute("fop.pagesInSequence.2")).intValue() > (note the small differences) Hierarchical data in Maps. Eeeek! (Sorry!) For these two I've already added a couple of classes you can get that information from. I've added this just for completeness. Have a look at org.apache.fop.apps.FormattingResults and the Driver.getResults() method. My original post can be found here: http://marc.theaimsgroup.com/?l=fop-dev&m=100747811203665&w=2 > > page-master used for each page (could be used to > > control the paper bin to get paper from, important for me in > > conjunction with PS Renderer). > During rendering or after the rendering is complete? Both. The PSRenderer could use it during rendering so it can set the respective paper bins. Currently, I'd need it more after rendering is complete because I currently generate PDFs that get converted to PostScript later on and I patch those files afterwards to apply paper bin selection (and other stuff). Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Tel. +41 41 317 2020 - Fax +41 41 317 2029 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
I would *love* to be able to be able to get the page number where some event append (for example by stating in .fo source) cause it would greatly improve fop/itext interfacing. I personnaly use fop to render most of my content but i finish the work using itext (to watermark content, reorganize pages to produce booklets, insert some annexes written in pdf .. etc) Thanks a lot, whether you implement that or not! Fred. --- Joerg Pietschmann <[EMAIL PROTECTED]> a écrit : > Jeremias Maerki <[EMAIL PROTECTED]> wrote: > > Output from FOP: > > - Generation statistics: Number of pages total > What about: > > total=((Integer)processor.getAttribute("fop.totalNumberOfPages")).intValue() > (Returns 0 before rendering, i suppose. Or is > throwing an exception > better?) > > > Number of pages of each page-sequence > Uh, perhaps > > pgsq2=((Integer)((Vector)processor.getAttribute("fop.pagesInSequence")).get(2)).intValue() > or (less recommended but may get more resonance) > > pgsq2=((Integer)processor.getAttribute("fop.pagesInSequence.2")).intValue() > (note the small differences) > > > page-master used for each page (could be used to > > control the paper bin to get paper from, important > for me in > > conjunction with PS Renderer). > During rendering or after the rendering is complete? > > Regards > J.Pietschmann > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, email: > [EMAIL PROTECTED] > ___ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
Jeremias Maerki <[EMAIL PROTECTED]> wrote: > Output from FOP: > - Generation statistics: Number of pages total What about: total=((Integer)processor.getAttribute("fop.totalNumberOfPages")).intValue() (Returns 0 before rendering, i suppose. Or is throwing an exception better?) > Number of pages of each page-sequence Uh, perhaps pgsq2=((Integer)((Vector)processor.getAttribute("fop.pagesInSequence")).get(2)).intValue() or (less recommended but may get more resonance) pgsq2=((Integer)processor.getAttribute("fop.pagesInSequence.2")).intValue() (note the small differences) > page-master used for each page (could be used to > control the paper bin to get paper from, important for me in > conjunction with PS Renderer). During rendering or after the rendering is complete? Regards J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
Keiron Liddle <[EMAIL PROTECTED]> wrote: > XML input > - various ways to supply FOP with the xsl:fo file I might be an idea to rely on JAXP 1.1 here. > general options > - base directory Make this "base URI". Make sure your concept allows resolving those pesky "url(#stuff)" properties in embedded SVGs generated by a transformation, which may mean "baseURI" is not constant, or that you need more than one baseURI. AFAIK Batik doesn't provide for user supplied URI resolving code either, so it's probably necessary to talk to them. I want to note that several code pieces for resolving URLs and/or file locations are scattered all over FOP and Batik. Replacing them all with an URIResolver invocation would unify behaviour and remove redundancies. I'd also recommend to lift the default URIResolver implementation from Saxon, it seems to tolerate the usual abuse better than everything else i came across elsewere. Keep up the good work! J.Pietschmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
At 05:11 PM 2/27/02 +0100, you wrote: >renderer options >- embedding fonts >- compression in pdf >- image embedding > > >The Driver handles the XML input. >The user agent information is through the FOUserAgent. >We could handle logging through the user agent. >Options could also be handled through the user agent, using mime type >selection for renderer options. > >So, what do people think. What other information will be needed. Keiron, my 2 cents, shot from the hip ;-) Based on both our fop usage here and on dozens of questions I've seen go by on this list, perhaps it makes sense to consider some support for driving various printing options. i.e., put up the dialog, default to std printer, etc. Clearly the options are very different for a servlet vs an application. Also, in view, of the new PrinterServices facility in 1.4, perhaps some thought to allowing the calling framework (servlet or app) to specifying the printer. And then there is the recurring question of whether -awt generates a panel or a frame and whether it returns a swing object or not. ' Best, -Ralph LaChance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: FOP Interfaces
> Since this seems to be a hot topic at the moment I thought I might jump > in. To use FOP in the various contexts we need to properly setup the right > interfaces. First we need to determine why and what those interfaces are. > > All of the interfaces are set through the Driver. The Driver is the > central control point for all fo -> pdf etc. transformations. I'm not so sure right now, if a monolithic Driver class is so good. Maybe we really have a little number of specialized classes for FOP processing that are particularly easy to use. For example an easy one that integrates nicely with JAXP. That could help reducing the support questions on how to embed FOP. Maybe we can have a FOPResult (similar to SAXResult) that people can use. I don't know yet, I'm just trying to gather some thoughts. :-) > Below is a sample of the type of areas and information that needst o pass > to and from FOP: > > User agent > The list of things this needs to supply is on this page, rather badly > formatted: > http://xml.apache.org/fop/design/useragent.html > > > Logging > - logging level > - logging messages of various levels > - error handling > > XML input > - various ways to supply FOP with the xsl:fo file > - sax handler > > general options > - base directory > - uri resolvers > > renderer options > - embedding fonts > - compression in pdf > - image embedding for the PS renderer (eventually): - PostScript Level - PPD to use - binary/ascii switch FOP's component setup: which implementation of a particular LayoutManager to use, Logging setup (LogKit, Log4J, JDK14Logging), etc. Output from FOP: - Generation statistics: Number of pages total, Number of pages of each page-sequence, page-master used for each page (could be used to control the paper bin to get paper from, important for me in conjunction with PS Renderer). > The Driver handles the XML input. > The user agent information is through the FOUserAgent. > We could handle logging through the user agent. > Options could also be handled through the user agent, using mime type > selection for renderer options. May I add that it might be nice if we could render to more than one renderer at once (maybe not from the command line). Two independent sources have asked me in the last few weeks if this works. I must say that this would be nice, since I could generate a PDF for the archive and the PS for the printer in one run. It would probably be faster than converting the PDF to PostScript afterwards. > So, what do people think. What other information will be needed. Maybe there's more... Cheers, Jeremias Märki mailto:[EMAIL PROTECTED] OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern Fon +41 41 317 20 20 - Fax +41 41 317 20 29 Internet http://www.outline.ch - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
FOP Interfaces
Since this seems to be a hot topic at the moment I thought I might jump in. To use FOP in the various contexts we need to properly setup the right interfaces. First we need to determine why and what those interfaces are. All of the interfaces are set through the Driver. The Driver is the central control point for all fo -> pdf etc. transformations. Below is a sample of the type of areas and information that needst o pass to and from FOP: User agent The list of things this needs to supply is on this page, rather badly formatted: http://xml.apache.org/fop/design/useragent.html Logging - logging level - logging messages of various levels - error handling XML input - various ways to supply FOP with the xsl:fo file - sax handler general options - base directory - uri resolvers renderer options - embedding fonts - compression in pdf - image embedding The Driver handles the XML input. The user agent information is through the FOUserAgent. We could handle logging through the user agent. Options could also be handled through the user agent, using mime type selection for renderer options. So, what do people think. What other information will be needed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]