Forum Bugs

--fileroot option


I am new to princeXML and have been trying it out to see if it fits our needs. Overall I have been quite happy with the results of the tests I have run, however I am having some problems with the --fileroot option.

I have some HTML files that are served off of our web server that I would like to convert to PDFs and that contain absolute paths for images and CSS files. The --fileroot option seems to address exactly this need. The problem is that when I include the option, it seems to be applied to the command-line arguments themselves as well as to the contents of the input file. The result is that if the path to the prince binary is an absolute one, prince says it cannot find the licence file:
prince: /usr/local/lib/prince/license/license.dat: error: can't open input file: No such file or directory
prince: warning: failed to load external entity "/usr/local/lib/prince/license/license.dat"
prince: /usr/local/lib/prince/license/license.dat: warning: could not load license

Also if the path to the HTML input file is absolute, it also can’t find it. If I use relative paths for the binary and the input files, everything works as expected. Certainly this can’t be the intended behavior?

Note that this happens whether I use prince from the command-line or using one of the language wrappers. This sort of breaks the --fileroot option, no?
This does indeed appear broken. We will investigate and fix the issue. Sorry for the inconvenience.
Good to hear that you are looking into this. Certainly your responsiveness to issues such as these are a factor in our decision to buy a server license or not. (Otherwise our tests have been quite positive.)
Trying to build a proof of concept so we can switch away from LaTeX. Any idea when this will be fixed? Thanks!
We have a fix ready now, which operating system are you running Prince on?
We have now released Prince 10 rev 3 for all supported platforms. It includes a fix for the --fileroot option, and also a new improved option called --remap which can remap URLs to local directories based on their prefix. For example:
prince --remap ...

This can be used in conjunction with the --baseurl option, and may be more useful and flexible than --fileroot in many situations.