HTML to PDF / DOCX / RTF Java converter library Forums PD4ML Forums Technical questions / Troubleshooting Image and style sheet not being found using relative url

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

    Hello,
    I am trying to upgrade from PD4ML v1 to v4. We have been using the transform tag in our jsp’s to convert to pdf.
    The image and css style sheets are not gettinf found unless we have use an absolute url. That was not the case in PD4ML v 1

    PD4ML v 1 image and link tags looked like this:
    <link rel=”stylesheet” href=”/css/report.css”></link>
    logo

    But now we need to define as absolute url:
    <link rel=”stylesheet” href=”<%=serverurl%>/css/report.css”></link>
    /images/logo-big.jpg” alt=”logo” align=”top”>

    Can you tell me why first style using relative url is not working anymore and if there is a better way?
    Thanks so much.

    #36157

    Correcting my post:
    Now in v4 following absolute urls are working but relative urls such as “/css/report.css” are not working:

    <link rel=”stylesheet” href=”<%=serverurl%>/css/report.css”></link>
    /images/logo-big.jpg” alt=”logo” align=”top”>

    #36161

    Hi! We’ve just created helpdesk ticket, based on the topic. An email notification must appear in your mailbox soon

    #36162

    BTW: does it work in your env if you removed the leading slash? &ltlink rel=”stylesheet” href=”css/report.css”></link>

    #36167

    I have tried both with and without the leading slash. And both do not work for image and css sheet url.

    With the css style sheet the styles do not get applied but the page loads. But with the image tag if absolute url is not used then a “Failed to load PDF document” message is displayed.

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

You must be logged in to reply to this topic.