Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #26539

    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

    #28489

    Hi Any updates on this issue?

    #28490

    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?

    #28491

    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

    #28492

    Hi Team,

    Any updates on this?

    thanks.

    #28493

    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 height/width attributes unchanged) as it described there:
    pdf-generation-troubleshooting-f4/prevent-images-being-scaled-t38.html

    #28494

    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

    #28495

    You cannot increase size of pixels. You may increase image size in pixels.

    For example:
    [language=java:1tmqc50j]width *= 5;
    height *= 5;
    BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    img.getRaster().setPixels(0, 0, width, height, pixels);[/language:1tmqc50j]

    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.

Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.