Hi all,
-Problem Context-
I've build an
applet to properly manipulate and visualize TIFF images in browsers (manipulate means to rotate, zoom, an multitiff support). The applet receive base64
string representation of the TIFF image and show it to the user properly using JAI API. The applet keep the image without any transformation (as a RenderedImage), and all operations (rotate, zoom) are kept in another Object (RenderedOp).
-Problem-
I want to implement a print function that allows the user to print the TIFF image kept in the applet, but when i print the image, only a portion of the image is printed because the image is to big. I tried to scale the image to fit the page size, but when printed, the image is not showed properly (image lost quality). After that, i tried to save the image into a file, to check if the image, when coded and decoded to a Base64 string representation, was losing quality. After save the image, i printed it using an image viewer (Ubuntu Image Viewer is the one i am using), but when printed from the image viewer, the printout was correct (the image was fitted in the paper without lose quality).
-Question-
¿How can i print an image bigger than paper size without lose quality?
¿Am i doing the wrong operation to the image to fit the page? (scale operation in this case).
Below i put the code of the print method (implemented in a Printable Object) that is used to print the image. In this code the image is scale to fit the page.
-Code-
Any comments or suggestions are welcome. Thanks in advance for your help.