PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 16:44 
I use css or html where images or css are declared by relative path like "../img/toto.png" .
But when i render the html, some of pictures and css are not found because the parser read a relaitve url ( ../img/ ) and go up for all search and not just for this specified url .

is it exist a workaround ?
is it exist a bug fix ?

Trace :
Code:
version: PD4ML 360b1 Pro (eval)
using content encoding from HTTP header: UTF-8
loading CSS file http://gaiactact.ira.appli.impots/gaia-agent/ctact/styles/posteAgent.css
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/styles/posteAgent.css
Warning: Invalid syntax in CSS declaration. "filter:"
Warning: CSS selector "*.inputParcourir" has error(s) in declaration (see above)
Warning: Invalid syntax in CSS declaration. Missing colon after "width220px"
Warning: CSS selector "*.LargColDetLibel" has error(s) in declaration (see above)
Warning: Invalid syntax in CSS selector: ""
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_stats.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_stats.gif
image size: 85
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_traces.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_traces.gif
image size: 107
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_aide.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_aide.gif
image size: 118
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_fermer.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_fermer.gif
image size: 107
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/top_deployable_info.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/top_deployable_info.gif
image size: 187
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_deployer_info.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_deployer_info.gif
image size: 845
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/mid_deployable_info.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/mid_deployable_info.gif
image size: 190
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_memento.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/ico_memento.gif
image size: 72
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_off_gauche_blanc.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_off_gauche_blanc.gif
image size: 67
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_off_droite_blanc.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_off_droite_blanc.gif
image size: 67
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_gauche_blanc.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_gauche_blanc.gif
image size: 217
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_droite_blanc.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/bt_droite_blanc.gif
image size: 174
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/ico_titre.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/ico_titre.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/ico_titre.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/ico_titre.gif not found.
can not load image: ../images/ico_titre.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
can not load image: ../images/bt_off_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
can not load image: ../images/bt_off_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
can not load image: ../images/bt_off_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif not found.
can not load image: ../images/bt_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg
resource http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg not found.
can not load image: ../images/form_ctact_titre1.jpg
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg
resource http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg not found.
can not load image: ../images/form_ctact_titre1.jpg
image not yet in cache: java:/resources/icons/arrow-up.gif
not yet in cache: java:/resources/icons/arrow-up.gif
image size: 664
image not yet in cache: java:/resources/icons/arrow-dn.gif
not yet in cache: java:/resources/icons/arrow-dn.gif
image size: 660
image not yet in cache: java:/resources/icons/cb-on-big-g.gif
not yet in cache: java:/resources/icons/cb-on-big-g.gif
image size: 3753
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
can not load image: ../images/bt_off_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_off_fond.gif not found.
can not load image: ../images/bt_off_fond.gif
image not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif
not yet in cache: http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif
resource http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif not found.
image http://gaiactact.ira.appli.impots/gaia-agent/images/bt_fond.gif not found.
can not load image: ../images/bt_fond.gif
done in 3281ms.


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 16:54 
OK, you specify

../images/form_ctact_titre1.jpg

PD4ML resolves it to

http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre1.jpg

As for me if the source HTML is located in http://gaiactact.ira.appli.impots/gaia-agent/ctact/ it is correct.

What should be the URL from your perspective?


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 19:25 
the initial ur is "http://gaiactact.ira.appli.impots/gaia-agent/ctact/afficherEvenement.do"

when pd4ml try to catch the image " ../images/form_ctact_titre1.jpg "
The base url becomes "http://gaiactact.ira.appli.impots/gaia-agent/"

after that pd4ml try to get another image located at
"http://gaiactact.ira.appli.impots/gaia-agent/images/form_ctact_titre2.jpg "
but this images is located at
"http://gaiactact.ira.appli.impots/gaia-agent/ctact/images/form_ctact_titre2.jpg "


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 19:36 
From my perspective the relative image link should be

images/form_ctact_titre1.jpg

instead of

../images/form_ctact_titre1.jpg

"../" prefix in the image link leads out of ctact directory.


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 19:47 
in fact this url "../images/form_ctact_titre1.jpg" is defined in css .
the url of the css is
http://gaiactact.ira.appli.impots/gaia- ... eAgent.css

so
../images/form_ctact_titre1.jpg is needed to go out of the directory "css" for the directory "images" .

But, it's the base url which is modified .


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 19:53 
ok, now I see your point.

Obviously it is a bug in our code. Would <base href="http://gaiactact.ira.appli.impots/gaia-agent/ctact/css/"> be a temporal workaround for you?

(if so you would also need to adjust stylesheet references)


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 20:09 
ok just for more precision the css is
.btBleuLien {background:url(../images/bt_fond.gif) repeat-x; padding:0.2em 4px 0.2em 0;}

I will try the workaround, you gave me
When do you think this bug would be fix ?


  Subject: Re: trouble with relative path for img or css
   PostPosted: 08 Jan 2010, 20:21 
We plan to publish a new beta on Monday; it is currently under QA, so it is too late to add the bugfix there. I guess the fix will be available with the next beta in 2-4 weeks.

If you own or plan to purchase one of our volume licenses, hopefully we'll be able to provide you with the fix next week.


  Subject: Re: trouble with relative path for img or css
   PostPosted: 11 Jan 2010, 14:25 
yes, we plan to buy a volume and source licence .


  Subject: Re: trouble with relative path for img or css
   PostPosted: 12 Jan 2010, 20:38 
We've just published a new beta (v360b2), which workarounds the issue. Please give a try.



[Reply]     [ 11 posts ]  Go to page 1, 2  Next

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share