On 29.01.2003 15:26:10 Mirko Sertic wrote:
> that sounds not so good.
> Given the following requirements :
> 1. i need to produce an invoice or order using fop.
> 2. i need to specify the tray to which each page is printed out.
> 3. i want to support non ps-able printer.
> 4. i need a pdf file for our archive system.

Number 3 sounds like the biggest challenge to me.

> How could this be done?
> My first thought was to run a post-process after fop. It thould take
> the pdf result, split it using a given definition using itext and
> finally send it to a network printer hosted by our linux host.

Awkward and probably slow as you gathered.

> But that sounds really strange and is far to complex, not to think about
> its robustness. It also would result a really huge printcap file, due to
> the different initial sequences for each pager tray on each printer.
> Another idea is to extend the pdf renderer that it can produce
> ps pass thru paper tray selection code. The definition what should
> be printed where and how would be stored somewhere in my source data
> and would be adressed using xpath and a page-sequence extension.

Sounds even more complex to me.

> The final result should be converted to ps using pdf2ps and be send to a
> printer using ghostscript ( some newsgroups entries says that tray selection
> is supported in gs 6.x, but i really do not know ).

Then you're lucky.

> I really want to do it this way. We could define the tray configuration in
> our source data and we do not neet to run a ugly post process.
> If i understand the source code right , the point i would need to hack is
> the renderPage
> method. Everything else would be left fine as it is.

Probably. Maybe it is enough if you just derive a new class from
PDFRenderer and use that. 

> What do you think ??

Difficult thing at any rate. I've just had a thought: What about the
Java printing API in JDK 1.4 in conjunction with the AWT renderer? I
think the printing API supports quite sophisticated printing attributes.
Never tried, though. And leaves out the PDF requirement except if you
don't care having slighty different output (not likely).

Seems like I was lucky only having to support PostScript printers. I
suggest you try out the GhostScript approach. If that doesn't work, try
to find a way to get rid of the non-PostScript requirement or give AWT a

Good luck anyway and keep me posted on your progress. I'm pretty
interested in your findings.

Jeremias Maerki

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to