[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] fo:basic-link to non-pdf file


Subject: Re: [xsl] fo:basic-link to non-pdf file
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 24 Feb 2013 08:41:03 -0500

At 2013-02-24 01:55 -0700, Mark Wilson wrote:
Your surmise was correct.

The PDF document containing the link was opened by using a link on an HTML page served up by my ISS 8 localhost. When I clicked on the link in the opened PDF, I got that strange "resource://pdf.js/web/ ".

However, opening it with Adobe Reader gave me an almost correct URL: ///C:/Czechout%20Index/builder/work/htm/hello.htm. The three'///' at the beginning of the URL appear to be just the start of my problems.

I suspect one cannot open a PDF file from an HTML page in a browser, then return from that PDF document to an HTML page in the same original directory using a base-uri constructed by <fo:basic-link external-destination> in an XSLT stylesheet (under these conditions).

Thanks for helping me to (maybe) understand this.

Well, I stick by what I said in my earlier note that it is an issue with your user agent and not an issue with the XSL-FO specification.


At 2013-02-24 00:22 -0700, Mark Wilson wrote:
That makes sense - I'll work with that idea and see what I come up with. I did search your book on XSL-fo
but found no answer there.

... which is what I say on page 160 of the 7th edition of my FO book. There are a number of user agents involved. Your XSL-FO engine is setting up the link information in the PDF file and your PDF reader is navigating to the specified link, and your browser is navigating to your PDF file from the starting HTML.


To test it just now, I created an HTML file with a link to the PDF created from the XSL-FO file. I opened the HTML in my browser. I clicked the link and that opened the PDF file in my browser. I clicked on the link in that PDF file and that opened the referenced other HTML in the browser. All in the same window. And using the back icon at the top I walked back through all the files. Using the forward icon, I walked forward again. All seamless. All what one would expect.

So I'm not sure why you make the blanket statement "one cannot open a PDF file from an HTML page in a browser, then return from that PDF document to an HTML page in the same original directory".

The user agents in my test are running in Windows, using Firefox with a PDF created by Antenna House. All of the links are relative, without the use of a protocol at the start of the URI.

I hope this extra information is helpful.

. . . . . . . Ken


-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Apr 2013 | Contact us for world-wide XML consulting and instructor-led training | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: https://plus.google.com/116832879756988317389/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


Current Thread
Keywords