HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › PD4ML failed to load Servlet Dynamically generated JPG File

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26484

    I am evaluating the PD4ML for our project.

    The dynamically generated JFreeChart image could not be loaded.
    The static images are loaded and converted in the PDF file.

    The MyChart servlet generates JPENG format image on the fly.
    The generated image can be loaded to the browser with
    URL http://localhost:11000/MyWeb/MyChart.

    When rendering the HTML page to PDF, the following are the error message:

    image not yet in cache: http://localhost:11000/MyWeb/MyChart
    not yet in cache: http://localhost:11000/MyWeb/MyChart
    resource http://localhost:11000/MyWeb/MyChart not found.
    image http://localhost:11000/MyWeb/MyChart not found.
    can not load image: http://localhost:11000/MyWeb/MyChart

    We tried to use useServletContext and it did not work either.
    <img src="<%=request.getContextPath()%>/MyChart" align="middle" />

    Any suggestions are greatly appreciated.

    Thanks
    Tom

    #28303

    I am haviing a similar issue. I am tryeing to load images served by a servlet….this is what i see…

    image not yet in cache: http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    not yet in cache: http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    image size: 2644
    image type of http://localhost:8080/tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086 is unknown.
    can not load image: /tb/image/loadByFileName.htm?fileName=2009_4R30.jpg&method=getFromDb&type=2&id=1000086
    done in 1305ms.

    #28304

    not yet in cache: http://localhost:8080/tb/image/loadByFi ... id=1000086
    image size: 2644
    image type of http://localhost:8080/tb/image/loadByFi ... id=1000086 is unknown.

    I would recommend to copy-paste the URL to a web browser and to check what it actually returns. The 2644 bytes could be a textual error message.

    #28305

    I get the same problem. Copying the url into the browser correctly brings back the image.

    #28306

    > Copying the url into the browser correctly brings back the image.

    PD4ML supports only JPEG, PNG and GIF. First please make sure, the image is of the supported formats.

    Also if the image generation requires a session context, you need to make sure SESSIONID is propagated to the image generation servlet.

    #28307

    I have the same problem.
    It works on the http:\localhost.

    image not yet in cache: http://localhost:9084/test/AttachmentServlet?attachId=43
    not yet in cache: http://localhost:9084/test/AttachmentServlet?attachId=43

    then it calls the servlet and returns the image
    image size: 137480

    but when I try it on the server:

    image not yet in cache: https://ddltest.xxxx.com/test/AttachmentServlet?attachId=43
    not yet in cache: https://ddltest.xxxx.com/test/AttachmentServlet?attachId=43
    image size: 12289
    image type of https://ddltest.XXXX.com/test/AttachmentServlet?attachId=43 is unknown.
    can not load image: /test/AttachmentServlet?attachId=43

    I don’t see the server version calling the Servlet.

    Please help.

    #28308

    [/color”>[/color] @PD4ML wrote:

    > Copying the url into the browser correctly brings back the image.

    PD4ML supports only JPEG, PNG and GIF. First please make sure, the image is of the supported formats.

    Also if the image generation requires a session context, you need to make sure SESSIONID is propagated to the image generation servlet.

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

The forum ‘General questions / FAQ’ is closed to new topics and replies.