PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: PDF output does not render images correctly
   PostPosted: 25 Mar 2011, 01:31 
Hi,
In our application we use PD4ML to generate PDF previews. In one such case, we also have images inside the document. The image is rendered correctly on HTML preview but does not renders correctly on PDF preview.

Please see attach generated html code and PDF preview. Look at the image under GAP column

Thanks


Attachments:
printpreview.zip [30.55 KiB]
Downloaded 55 times
  Subject: Re: PDF output does not render images correctly
   PostPosted: 31 Mar 2011, 22:22 
Hi Any updates on this issue?


  Subject: Re: PDF output does not render images correctly
   PostPosted: 01 Apr 2011, 14:20 
As I see in the HTML source there is a lot of JavaScript code to manipulate images. Please take into account: PD4ML does not support JavaScript.

Try to switch debug on (pd4ml.enableDebugInfo()) and inspect STDOUT/server's log.

Does it try to load the images at all?
Are the requested URLs correct?


  Subject: Re: PDF output does not render images correctly
   PostPosted: 06 Apr 2011, 09:02 
HI Team,

I have enabled pd4ml.enableDebugInfo(). And verified the STDOUT/server's log.

In server log, I have seen the urls for other images and gap rater.

I have Observed other images are rendering properly. But not Gag rater image.

I have tried to access gap rater image URL through browser(In HTML). Its displaying properly. (Attaching the screen shot for this)

Please find the attached server log.
Could you please suggest me on this?

Thanks.
Sada


Attachments:
rategap.gif
rategap.gif [ 1.46 KiB | Viewed 837 times ]
serverlog.doc [35 KiB]
Downloaded 65 times
  Subject: Re: PDF output does not render images correctly
   PostPosted: 11 Apr 2011, 06:25 
Hi Team,

Any updates on this?

thanks.


  Subject: Re: PDF output does not render images correctly
   PostPosted: 11 Apr 2011, 15:45 
Obviously the only problem is the original image dimensions. The image itself is too small and Acroread's image scaling routines cannot produce anything acceptable from it.

Unfortunately from PDF we cannot choose applied image scaling algorithm. The only available PDF option is to force to interpolate the image, which usually gives even worse result (when applied to tiny images).

As a workaround I would recommend to generate images with greater dimensions (keeping <img> height/width attributes unchanged) as it described there:
pdf-generation-troubleshooting-f4/prevent-images-being-scaled-t38.html


  Subject: Re: PDF output does not render images correctly
   PostPosted: 25 Apr 2011, 08:22 
Hi Team,

I have tried to increase the pixel size of image. By using below code.


BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
img.getRaster().setPixels(0, 0, width, height, pixels);

But i am not able to crease the pixel size.

Could you please suggest me on this?

Thanks,
Sada. B


  Subject: Re: PDF output does not render images correctly
   PostPosted: 26 Apr 2011, 13:49 
You cannot increase size of pixels. You may increase image size in pixels.

For example:
width *= 5;
height *= 5;
BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
img.getRaster().setPixels(0, 0, width, height, pixels);


But, of course, pixels array must have a corresponding image data, match the new dimensions.

Also, if transparency is not absolutely necessary, I would recommend to use BufferedImage.TYPE_INT_RGB, or even BufferedImage.TYPE_BYTE_INDEXED to reduce resulting PDF document size.



[Reply]     [ 8 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share