Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

PDF links (7.11.2.2) and behavior on the web

$
0
0

Hello all,

 

I'm trying to generate a PDF file (from scratch, using a C++ library - but that's not relevant to my question) that uses links to specify the location of linked files relative to the root of a drive - NOT relative to the PDF file itself (i.e.  I don't want to use ../../).

 

As best I can tell from the PDF specification (PDF32000_2008.pdf, section 7.11.2.2 and 7.11.2.3) - creating such links should be as simple as using a double forward slash to specify 'no drive'.

 

e.g.   To link to the file in c:\images\test.jpg from a PDF file you know is also on the c: drive - the links written form is: //images/test.jpg (as per table 43)

 

This works fine when I access it from my desktop - when both the PDF and JPG are on my c: drive - however if I copy the PDF to my test web server, and put the test.jpg file in a folder called images on the root of my web server - the link fails when executed in the PDF opened on the server (in the Reader loaded inside the browser).

 

I can see what's happening - and want to know if there is something I can do (or should be doing) to fix it.

 

What happens is that the 'no drive' path is actually removing too much from the path.

 

Instead of trying to open http://127.0.0.1/images/test.jpg, the actual link that appears in the browser address bar is http://images/test.jpg.

 

Any help would be much appreciated,

 

Thanks

 

Adam

 

(I've attached a example.pdf file that contains a link to \images\test.jpg - which works on the desktop, but not in the browser)


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>