HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues External stylesheets by LINK tag – not evaluated at all?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26332

    I am using pd4ml.pro.trial.360b3 (our registered version is a pro one of older date and we are evaluating the newest one for its fit for the present task) and I am bumping into an issue we have had for some time already.

    We use PD4ML to generate PDF from regular pages of our front-end, and as such, we try to pass them to the library as little altered as possible.

    We are setting the document BASE for relative external resoutrces, which works all fine…except for CSS.

    Our CSS is being referenced in a way sich like this (mightysite.dom is in reality a proper existing domain)
    <br /> <head><base href="http://www.mightysite.dom/" /><br /> <link type="text/css" rel="stylesheet" href="http://www.mightysite.dom/static/generated/StoreFront/styles/main.ipm/dgnportalvsportal_l0.css?version=1265703941452"><br /> <link type="text/css" rel="stylesheet" href="http://www.mightysite.dom/static/generated/StoreFront/styles/content.ipm/dgnportalvsportal_l0.css?version=1265703941483"><br /> ...<br />

    and the CSS doesn’t seem to have any effect at all. It is being returned with the “text/css” content type.

    Outputting all CSS into the main HTML document works well, though, as an unpleasant workaround, we’d like to be able to resign on this.

    Is there a known issue regarding external stylesheets – is it not a recommended way at all, or are we just doing something PD4ML doesn’t like?

    If any further information or code can help you understand/identify the issue, please let me know.

    Thanks a lot.

    #27851

    First I would switch debug info on (pd4ml.enableDebugInfo()) and inspect the stdout or server’s log.

    Please make sure that mightysite.dom alias(?) is known to the server (not only to your web-browser): try to traceroute/ping/http to mightysite.dom from the server, where your PD4ML-enabled application is located.

    #27852

    First, thank you very much for your quick reply. The code is being run on mightysite.dom itself and it is known to itself. The problem shouldn’t originate there. Images, for example, are being downloaded fine.

    As for the debug info, that is a slight problem, because the PD4ML library is being used internally by our own module, so it’s one level too depp for me. Can’t easily access and modify PD4MLs properties. I’ll see what I can do.

    So, in principle, you say that the external stylesheets should work…right?

    #27853

    > The code is being run on mightysite.dom itself and it is known to itself.

    It is a usual situation a server is behind the firewall, and its external name (like myserver.com) is known only to reverse proxy. In the corporative internet the server appears under a “cryptic” no-way-to-remember name.

    But you are right: if it loads the images, it is not an issue for your environment.

    The debug output should give you a clue if it tries to load any CSS at all.

    Also a severe syntax error in CSS may fail the entire stylesheet – you’ll find traces of that (if any) in the log file.

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

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