February 11, 2010 at 17:39#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.February 11, 2010 at 17:59#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.February 11, 2010 at 18:12#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?February 11, 2010 at 21:08#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.
The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.