I'm using Prince 10 rev 4 patch 1 on windows and it seems that even when loading a page via HTTP, any external resource that doesn't use a fully qualified url is resolved against the local file system.
Setting --baseurl to http://some-url doesn't seem to have any effect.
where localhost:8081/static/[FILE] represents the output of intermediate phantomjs processing step and localhost:9000 is the web app containing the external resources.
prince http://yeslogic.com --baseurl https://www.princexml.com -o out.pdf
It should warn about one missing style sheet and three missing images, but the PDF should include the purple Prince "box" (taken from /images/fakebox.png which is available on both servers).
I've tested this command on Windows with Prince 10 and it works fine, so if it also works for you we will need to establish what differs in your input documents or configuration.
./prince.exe http://yeslogic.com --baseurl https://www.princexml.com -o out.pdf
prince: https://www.princexml.com/css/style2.css: warning: The requested URL returned error: 404 Not Found
prince: https://www.princexml.com/images/princelogo.png: warning: The requested URL returned error: 404 Not Found
prince: https://www.princexml.com/images/protoforumscreenshot.png: warning: The requested URL returned error: 404 Not Found
prince: https://www.princexml.com/images/protoforumlogo.png: warning: The requested URL returned error: 404 Not Found
I'm seeing 404 for the resources, but at least it seems to be attempting to load them from the correct location.
That was it, thanks! It was the base tag generated by Angular.
<base href="/">
I just added a quick function to our phantomjs script to strip the base tag from the intermediate output. Our images are now being loaded successfully. Is there a different non-phantomjs based solution that you would generally recommend for cases like this?