Home pageFind It!Contact PJAPJA documentation


 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Printing Problem


Location : india
Member since : Sep 9, 2004
Messages : 2
 Oct 13, 2004 at 9:17 AM
Hi all,

I have strange problem i tried with my code i couldn't find my problem is
1)I have encode few dynamic images to browser using followin code

Image img1 =new PJAToolkit().getImage(sgImgpath + "/image.jpg");

PJABufferedImage thumbImage=new PJABufferedImage(img1.getWidth(null)+8, img1.getHeight(null)*prarPgBrkVec.size()+0,PJABufferedImage.TYPE_INT_RGB);
Graphics2D graphics2D =(Graphics2D)thumbImage.getGraphics();

graphics2D.drawImage(img, 0, lonuheight, img.getWidth(null), img.getHeight(null), null);
//at last i am output to browser using following ..code
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(response.getOutputStream());
response.getOutputStream().close ();

The problem is:

It displays all the images when it opens in a browser butm, when i give print it prints only first page when there is more than one page even it is not showing in print preview also.

Thanks in advance,

[Subject updated by moderator]


Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Oct 22, 2004 at 9:27 PM
The JPEGEncoder you use is the one available with the JDK and I don't think PJA Toolkit may have some bad influence on the image this encoder generates.
Did you try your servlet without PJA Toolkit so you could check whether this issue is due to PJA or not ?
Manu (moderator/modérateur)

Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation