Ah, that explains something for me.
The XEP processor has an extension for local PDF links. I wondered how
they did it. If you specify:
external-destination="url(file:myfile.pdf#frag)"
then it forms PDF output similar to what
you describe.
When I was looking at the PDF results, FOP
would produce /URL syntax when there was a fragment identifier, and it would
produce /F syntax when there was not. So local links to the whole document
worked since /F contained just the PDF filename.
Bob Stayton
Sagehill Enterprises
DocBook Consulting
----- Original Message -----
From:
Tim Casling
To: 'Bob Stayton' ;
Sent: Wednesday, April 20, 2005 9:07
AM
Subject: RE: [docbook-apps] PDF named
destinations using FOP
That’s great. I
can see that the named destinations now exist. However, if I can’t link
to them…
To get links between
local PDF files I don’t think PDF links with a fragment identifier are
needed, I think FOP needs to translate the FO link to something
like:
</D(name-of-destination)/F
1126 0 R/S/GoToR>>
<</F(myfile.pdf)/Type/Filespec>>
rather than a
<<URI (myfile.pdf#frag)
So I suspect it may
be a problem with the type of link generated by FOP.
Tim
From: Bob
Stayton [mailto:]
Sent: 20 April 2005 09:20
To: Bob Stayton; ;
Subject: Re: [docbook-apps] PDF named
destinations using FOP
I checked into
CVS the changes to fo/fop.xsl to insert the fox:destination elements for
everything that has an id attribute. You could try out the snapshot
build. Be sure to set the stylesheet parameter insert.olink.pdf.frag to
1 so the fragment identifier is output to the FO
file.
But I'm still a bit
discouraged with how poorly supported linking between PDF files is with the
current PDF readers. I could not get links between local PDF files
working if they included fragment identifiers. If there is a fragment
identifier, then the PDF output has "/URI (myfile.pdf#frag)". If you try to
browse this locally with Acrobat Reader, it thinks you want http://myfile.pdf#frag, which does not
work. I tried various combinations of file: protocols, but none worked
for me on Windows XP. I could only get fragment identifiers to work if I
used an absolute URL to a file I installed at that address on my
website. Not very flexible.
Bob Stayton
Sagehill Enterprises
DocBook
Consulting
----- Original Message -----
From: Bob Stayton
To: ;
Sent:
Tuesday, April 19, 2005 2:24 PM
Subject: Re:
[docbook-apps] PDF named destinations using
FOP
Hi
Tim,
Other XSL-FO processors
like XEP and XSL Formatter automatically convert id attributes to named
destinations. I didn't know that FOP required a separate extension to
do that. I'll see if I can get that
working.
Bob Stayton
Sagehill Enterprises
DocBook
Consulting
----- Original Message -----
From: Tim Casling
To:
Sent:
Tuesday, April 19, 2005 1:07 AM
Subject:
[docbook-apps] PDF named destinations using
FOP
Hi,
Has anybody implemented the
fox:destination extension with the docbook fo stylesheet? I did a
web search and there were suggestions that the default behaviour should be
to convert IDs into PDF named destinations, but currently this doesn’t
happen with FOP.
Tim