Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #26749

    I’m encountering a bizarre problem when attempting to render a page from HTML supplied to PD4ML in an input stream. The HTML contains various images – some from localhost (with src=”http://localhost/image.jpg” or similar), and some from a remote server. The images from localhost are being included in the PDF output fine, but those from the remote server are not.

    Initially I thought this might be a connection issue, and that network settings and proxy configuration might be responsible for PD4ML being unable to load these images. However, it turns out that PD4ML seems perfectly capable of rendering images from a remote server when those images are on a web page supplied by URL.

    To give an explicit example: when I attempt to render the html “” (the Google logo on the main page) by passing it into the PD4ML.render(InputStreamReader, OutputStream) method, I’m given a blank PDF document. But when I attempt to render the Google homepage by calling PD4ML.render(“”, outputStream), the PDF document is rendered fine, including the logo. There’s a minor discrepancy in that the logo on the Google homepage is included as the background of a

    tag, but that turns out to be irrelevant as the same div doesn’t render with a background when passed directly to PD4ML.

    It seems slightly bizarre that PD4ML is able to download images in the one case but not in the other. Are you able to shed any light on why this might be? Thanks.


    Did you try to enable debug info and to check what it writes to the log/STDOUT by an attempt to load the image (if any attempts at all)?

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

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