Re: [icon-users] Web Links in PDF files
- From: "Matthew Phillips" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "spam2011m" for DMARC)
- To: icon-users@xxxxxxxxxxxxx
- Date: Mon, 20 Feb 2017 20:42:42 GMT
In message <1bfc0b1056.jim@xxxxxxxxxxxxxx>
on 17 Feb 2017 Jim Nagel wrote:
John McCartney wrote on 17 Feb:
I've just constructed a new document with web links in it. As an example,
one of the links was www.riscosopen.org which launched correctly from
TechWriter and from PDF.
When it was saved as a PDF file and viewed in Foxit Reader, the links
failed. They came back with error message in Firefox: "Firefox can't find
the file at /G:/ARM7500/NoTypes/www.riscosopen.org"
It wasn't until I amended the links in the original document to their
full form, eg, http://www.riscosopen.org that the links were correctly
observed in Foxit.
You'd think the PDF spec would allow recognize-and-make-live of a bit of
text marked in the original document as a hyperlink, ideally using some
sort of style tag -- same idea as an <a href> tag in an HTML doc.
Well, if you wrote a link like that (without the protocol indication
"https:" and the root path of "//") in an HTML document you would probably
get the same effect, because the browser would treat it as a relative link.
<a href="abc.html">
will link to abc.html in the same directory as the current page
<a href="../abc.html">
will link to abc.html in the parent directory of the current page
<a href="/abc.html">
will link to abc.html in the root directory of the server from which the
current page was fetched.
<a href="//server.co.uk/abc.html">
will use the same protocol as the current page (e.g. http or https) to fetch
abc.html from server.co.uk
So putting <a href="www.riscosopen.org"> will try to open a file called
www.riscosopen.org in the same directory as the current page.
I'm not surprised, therefore, that the Foxit PDF reader tried accessing
/G:/ARM7500/NoTypes/www.riscosopen.org but it's up to software developers if
they want to apply intelligence to second-guess mistakes made by authors of
documents. You may be able to type www.riscosopen.org into a browser to open
the page, but that's only because the browser has been told to assume http or
https, rather than ftp:,
mailto:, gopher: or various other possible
protocols. Links typed by users are more likely to be "sloppy" in this way,
but links found in documents and web pages will be treated more literally --
the browser must follow the standards.
Matthew
--
Matthew Phillips
Durham
------------------------------------------------------------
To change, suspend or cancel your subscription go to
//www.freelists.org/list/icon-users
------------------------------------------------------------
Other related posts: