To give you an example. Let's say the script that generates the PDF file is at:
/document/generate.php
And the image is at:
/images/logo.gif
And the image tag is:
<img src="/images/logo.gif">
The script seems to execute with a current working directory of /document (well, wahtever directory that resolves too), although with Apache rewrite rules I think that might actually be different.
Part of the problem is I don't know what Pache and Prince are separately doing regarding current working directory.
I've tried setting the base URL to the following:
..
../
and it didn't work. It'd be nice if the prince log would print some output about the current working directory and/or if it couldn't load a particular stylesheet or image (listing the exact path it tried and why).
This is what's getting me stuck: a complete lack of information.
If I have to put in a full base URL (
http://mysite.com) to get this to work I wil but I won't be happy about it because the sitename varies depending on if it's a production or test site.
I don't want to put in an absolute pathname (like /var/www/mysite) because that too varies.
But I'll prefer a URL to the absolute path. Can you please confirm how I get it to resovle by path? Just put in the path or a URL like file://... ?
My preferred choice is just to tell Prince (relatively) where the "root" directory of the Web application is and to resolve all URLs from there.
Can this be done? If so, how?