Hi Sivaraman,

"Viswanathan, Sivaraman IN BLR SISL" <[email protected]> 
wrote on 02/26/2009 11:41:21 PM:

> Is there any way to extend the Batik printtrascoder print 
> functionality to print with headers and footers.. I tried batik 
> groups mails but I am not able to find any suitable answers to this 
question.

    Of course it is possible to extend the Batik print transcoder.
You have access to the source, you would have to add the code to
draw the header/footer in the batik.transcoder.print.PrintTranscoder.print
method.  You can actually see a really simple example commented
in the code already:
        // g.drawString(uris[pageIndex], 30, 30);

    Another option you might consider however depending on the
complexity of your header/footer needs would be to leverage
Batik's sister project Apache FOP to do the page layout.
I'm not sure if they will talk directly to the Java print API's
but they can generate nice PDF files.
 

Reply via email to