Print TIFF

How can I print TIFF using JAI?
[45 byte] By [matrixPooh] at [2007-9-26 13:40:52]
# 1

In case anyone else has the same problem --

Thanks to Brian from Sun, I got the answer -

actually, it is enough to create a java.awt.image.BufferedImage object initialized with my TIFF and then use it to render graphics for printing.

In order to get that BufferedImage, all I needed was to use getAsBufferedImage() on the RenderedOp object.

matrixPooh at 2007-7-2 14:24:59 > top of Java-index,Security,Cryptography...
# 2

> In case anyone else has the same problem --

> Thanks to Brian from Sun, I got the answer -

> actually, it is enough to create a

> java.awt.image.BufferedImage object initialized with

> my TIFF and then use it to render graphics for

> printing.

> In order to get that BufferedImage, all I needed was

> to use getAsBufferedImage() on the RenderedOp object.

Hi,

Could you give a code sample or snippet on how to do this?

I tried creating a class which implements java.awt.printable and then defining a print method but my scaling and translation seems to be off.

Cheers,

Sid

sidkr at 2007-7-2 14:24:59 > top of Java-index,Security,Cryptography...
# 3

> > java.awt.image.BufferedImage object initialized

> with

> > my TIFF and then use it to render graphics for

> > printing.

> > In order to get that BufferedImage, all I needed

> was

> > to use getAsBufferedImage() on the RenderedOp

> object.

>

> Hi,

>

> Could you give a code sample or snippet on how to do

> this?

I mean I have the BufferedImage, now how do I print it?

Thanks again,

Sid

sidkr at 2007-7-2 14:24:59 > top of Java-index,Security,Cryptography...