You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Patrick Ohly <Pa...@gmx.de> on 2007/06/17 22:59:14 UTC

absolute URLs in PDF

Hello,

in case someone else has the same problem: my PDFs generated by Forrest
contained relative URLs for site-internal links which the PDF viewer
then couldn't open because it didn't know the start URL. Attached is a
patch for document-to-fo.xsl which turns relative URLs into absolute
ones in the PDF. It applies to 0.8 cleanly only after also applying the
PDF summary patch; otherwise be prepared for a few line offset warnings.

I enabled this in my skinconf.xml with:
    ...
    <!--
      Normally all links inside a Forrest site are relative. This
      does not work well in PDFs which are typically viewed outside of
      the web site. Setting this option adds the given prefix to all
      relative URLs, both to the link as well as the optional, additional text.
    -->
    <url-prefix>http://www.estamos.de/</url-prefix>
  </pdf>

Is there anything which I might have missed in the patch? If you find
this useful, I'll also submit it via the tracker.

-- 
Bye, Patrick Ohly
--  
Patrick.Ohly@gmx.de
http://www.estamos.de/

Re: absolute URLs in PDF

Posted by Patrick Ohly <Pa...@gmx.de>.
On Sun, 2007-06-17 at 22:59 +0200, Patrick Ohly wrote:
[absolute URLs more useful in PDF]
> Is there anything which I might have missed in the patch? If you find
> this useful, I'll also submit it via the tracker.

See http://issues.apache.org/jira/browse/FOR-1013

-- 
Bye, Patrick Ohly
--  
Patrick.Ohly@gmx.de
http://www.estamos.de/