External links to pdf-files on http-servers and https-servers seem to
lead to different output in fop pdf rendering, with the result that
links to pdf-files on https are not clickable in pdf reading programs.

My source is in docbook xml, example section:

<section> <title>test</title>
<para> <ulink url="http://xmlgraphics.apache.org"/> </para>
<para> <ulink url="https://xmlgraphics.apache.org"/> </para>
<para> <ulink url="http://xmlgraphics.apache.org/index.pdf"/> </para>
<para> <ulink url="https://xmlgraphics.apache.org/index.pdf"/> </para>
<para> <ulink url="file://index.pdf"/> </para>
<para> <ulink url="index.pdf"/> </para>
</section>


With xsltproc I get the same structure for each type of link from my source:
...
<fo:basic-link
external-destination="url(http://xmlgraphics.apache.org/index.pdf)">
http://xmlgraphics.apache.org/index.pdf</fo:basic-link>
<fo:basic-link
external-destination="url(https://xmlgraphics.apache.org/index.pdf)">
https://xmlgraphics.apache.org/index.pdf</fo:basic-link>
...

When I transform the fo to pdf with fop (0.95) I get different results
for the http and the https links (I turned off compression of the pdf):

...
12 0 obj
<< /Type /Annot
/Subtype /Link
/Rect [ 120.0 680.506 280.26 689.506 ]
/C [ 0 0 0 ]
/Border [ 0 0 0 ]
/A << /URI (http://xmlgraphics.apache.org/index.pdf)
/S /URI >>
/H /I
>>
endobj

13 0 obj
<<
/Type /FileSpec
/F (https://xmlgraphics.apache.org/index.pdf)
>>
endobj
14 0 obj
<<
/S /GoToR
/F 13 0 R
/D [ 0 /XYZ null null null ]
>>
endobj

The (/Type /Annot /Subtype /Link) objects are clickable in e.g. acroread
and will download the corresponding pdf document. The /FileSpec links
lead to a different cursor, but do not download the document when clicked.

The file-links from my docbook source,
<para> <ulink url="file://index.pdf"/> </para>
<para> <ulink url="index.pdf"/> </para>
create the same /FileSpec objects in the pdf output.

The question is whether this is the intended behaviour of fop, or a bug?
I would prefer that clicking on all types of links leads to a download
of the corresponding document.

The links to the xmlgraphics homepage, however, work as expected for
http and https:
<para> <ulink url="http://xmlgraphics.apache.org"/> </para>
<para> <ulink url="https://xmlgraphics.apache.org"/> </para>

Best regards,
Thomas Bauer

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to