Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #26217


    Everytime my HTML source code contains an image I get the following error:

    image not yet in cache: file:../images/barrreMenu_bleu.jpg
    not yet in cache: file:../images/barrreMenu_bleu.jpg
    ..imagesbarrreMenu_bleu.jpg (Le chemin d’accès spécifié est introuvable)
    image file:../images/barrreMenu_bleu.jpg has zero length.
    can not load image: ../images/barrreMenu_bleu.jpg

    “barrreMenu_bleu.jpg” is the name of my image file. It’s a static image. I’ve same problem for every images.

    I’ve same problem with dynamical image cretaed by JFreeChart.

    Can you help me please ?


    Obviously PD4ML has no info about URL base of the document and it cannot resolve the relative path to an absolute one.

    A possible reason – you render the HTML to PDF with

    [language=java:3s3k01xg]render( isr, os)[/language:3s3k01xg]
    and the document has no tag.

    A solution is to use

    [language=java:3s3k01xg]render( isr, os, base)[/language:3s3k01xg]


    If the explanation does not match your PD4ML usage scenario, please provide more info.


    Thank you for your response.

    I can now load all my statics images, but I can’t load dynamical images created by JFreeChart.

    I include those images in my JSP by a call to the DisplayChart servlet provided by the JFreechart library. The syntax of this call is :

    request.getContextPath() + “/servlet/DisplayChart?filename=” + filename

    thanks for your help


    In that case PD4ML cannot resolve the web app context (request.getContextPath()) to anything “loadable” – to an absolute path or full URL.

    Try to pass servet context to PD4ML – it should help to load the dynamic resource:

    [language=java:lrhox354]useServletContext(ServletContext ctx)[/language:lrhox354]



    I’ve already added this piece of code.

    But I’ve found the problem: it comes from the DisplayChart code of JFreechart.
    It needs some little changes to work with pd4ml.

    Since I find this, my company (service from french government) can buy a licence of your product.


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

The forum ‘Troubleshooting’ is closed to new topics and replies.