Forum Bugs

Forcing href to non-local file

clarkeclark
I'm not having any success getting my generated PDFs to show the proper hyperlink.

I'm using the Windows version. I've tried the <BASE href="..."> and many other combinations. No luck. Prince keeps generating references to local files on my PC.

Here's an example:
<a href="downloads/VM_Springboard.pdf" target="_blank">Venture Marketing&rsquo;s Springboard Document</a>


I keep getting links like:
c:\Documents and Settings\pc_user\My Documents\webfile\root\downloads\VM_Springboard.pdf

I'm sure it's got to be something simple. I'm just not seeing it.
mikeday
It seems to work here. Could you paste here or mail me a small sample document that demonstrates the problem?
brohlin
I have a similar problem. I have this anchor tag in my HTML document.

<a href="my.pdf" target="_blank">Newsletter</a>

I convert my HTML to PDF as follows: prince --input=html tw-file-403236.html tw-forum-403236-html.pdf

The anchor tag for "Newsletter" takes me to the top of the page at tw-forum-403236-html.pdf. The erroneous hyperlink is http://127.0.0.1:8080/test/tw-file-403236-html.pdf#page=1.

How can I create a hyperlink to open the PDF called my.pdf in a new tab?

I cannot use absolute paths because we are migrating this content to a new server and I do not know the name of the new web site.
mikeday
PDF viewers don't know about browser tabs, and can't force the browser to open a new tab. If the link is pointing to the correct PDF file, that's as good as we can get I'm afraid.

I don't think we can embed relative URL links in PDF at the moment, eg. "myfile.pdf" without any indication of which server it comes from. I will investigate this.
brohlin
I figured out how to do this last night. I had to add this bit of style. Now, my anchor tag gets the right URL.

a { prince-pdf-link-type: web; }

Thanks for responding to my post.