Thanks for all you help, I'll give that a shot and keep you posted.
Yanick
-----Original Message-----
From: Thomas E Deweese [mailto:[EMAIL PROTECTED]]
Sent: August 19, 2002 9:59 AM
To: Batik Users
Subject: RE: Printing Multi-page document


>>>>> "YG" == Yanick Gaudet <[EMAIL PROTECTED]> writes:

YG> I'd be happy to create KEY_MULTI_PAGE_PRINT hint for the
YG> printTrancoder.  Would you mind telling me how you would do that?
YG> Since I'm pretty new with the SVG/Batik detail will be
YG> appreciated.

    If you look at the PrintTranscoder class you will see where all
the other KEY's are defined, you should add your's to the list.  I
would suggest splitting the definition into pages across/down (you
could extend the types supported for keys to include Dimension - see
what is done for Rectangle2D in
org.apache.batik.transcoder.keys.Rectangle2DKey).

    Then in the 'print(Graphics _g, PageFormat pageFormat, int
pageIndex) method you can figure out what part of what image is being
printed by taking 'pageIndex % (pagesAcrosss*pagesDown)'.  Then update
the computation of the transform so it scales/translates the image so
just the desired part fills the current page. (note that 'bounds' in
this code is the section of the document to print with everything
factored in, so this is what you want to spread across multiple
pages).

    Setting up the affine transform may be a bit tricky but there
isn't much I can do to help you there (other than write the code :).

YG> Thanks you very much.  Yanick

    Good luck, I look forward to hearing back from you.

    Ohh, if you aren't using CVS yet I would suggest using it for this
as it makes it very easy to submit the changes (just 'cvs diff').

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





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

Reply via email to