Donald Jayawardena wrote: > > Hi Bruno, > > Sorry for confusion. Is that allright if I put the problem down here > before I put it in iText?
Not really, but your question is more clear now. > The images are produced in another servlet (named createjpg). > > 1. HTML output is working fine. I use the following syntax to get the > image from createjpg servlet: > out.println(" <img height=36 width=36 " src=" + > "http://accord-wf-dev.unix.srv.westpac.com.au:9704ccord-wf-dev.unix.srv.westpac.com.au:9704/createjpg/createjpg" > > + ">"); createjpg is called from the client. > 2. I am having problems getting the image into PDF from the createjpg > servlet. > > I am running the following command to get the image into PDF from > createjpg servlet: > com.lowagie.text.Image iRiskNo = com.lowagie.text.Image.getInstance(new > URL("http://accord-wf-dev.unix.srv.westpac.com.au:9704ccord-wf-dev.unix.srv.westpac.com.au:9704/createjpg/createjpg")); > createjpg is called from the server. > During the debug, when this statement being executed, I can see the > output is showing: > SEVERE: -->> returning Frame NULL > SEVERE: BaseDialog: owner frame is a java.awt.Frame THIS IS NOT, I REPEAT, THIS IS NOT AN iText ERROR MESSAGE!!! Please understand that you don't have to look at iText when looking for the problem. > From the logs, I could see that the calling to createjpg servlet > happened successfully. > > createjpg servlet produces the image as follows: > JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); > JPEGEncodeParam param = > encoder.getDefaultJPEGEncodeParam(bufferedImage); > param.setQuality(1.0f, false); > encoder.setJPEGEncodeParam(param); > encoder.encode(bufferedImage); > > Hope this does not confuse you. You should understand that calling a servlet from a client IS NOT THE SAME as calling a servlet from the server. It works for the HTML, because the browser is calling the servlet through HTTP on the internet/intranet. That doesn't mean your server permissions allow you to call the servlet. This is really not an iText problem. I'm forwarding this to the mailing list so that others can confirm. best regards, Bruno ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/