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
--  
[EMAIL PROTECTED]
http://www.estamos.de/
*** main/webapp/skins/common/xslt/fo/document-to-fo.xsl.patched	2007-06-17 22:17:57.000000000 +0200
--- main/webapp/skins/common/xslt/fo/document-to-fo.xsl	2007-06-17 22:51:19.000000000 +0200
***************
*** 20,25 ****
--- 20,27 ----
                  version="1.0">
  <!-- left, justify, right -->
    <xsl:variable name="text-align" select="string(//skinconfig/pdf/page/@text-align)"/>
+ <!-- prefix which turns relative URLs into absolute ones, empty by default -->
+   <xsl:variable name="url-prefix" select="string(//skinconfig/pdf/url-prefix)"/>
  <!-- print URL of external links -->
    <xsl:variable name="show-external-urls" select="//skinconfig/pdf/show-external-urls"/>
  <!-- disable the table of content (enabled by default) -->
***************
*** 707,717 ****
          </fo:basic-link>
        </xsl:when>
        <xsl:otherwise>
!         <fo:basic-link color="{$color}" text-decoration="underline" external-destination="[EMAIL PROTECTED]">
            <xsl:apply-templates/>
          </fo:basic-link>
          <xsl:if test="$show-external-urls = 'true' and @href != string(.)">
!           (<xsl:value-of select="@href"/>)
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>
--- 709,736 ----
          </fo:basic-link>
        </xsl:when>
        <xsl:otherwise>
!         <!-- Make relative URLs absolute -->
!         <xsl:variable name="href">
!           <xsl:choose>
!             <!-- already absolute -->
!             <xsl:when test="contains(@href,'://')">
!               <xsl:value-of select="@href"/>
!             </xsl:when>
!             <!-- add prefix if one is set -->
!             <xsl:when test="$url-prefix != ''">
!               <xsl:value-of select="concat($url-prefix,@href)"/>
!             </xsl:when>
!             <!-- keep as is -->
!             <xsl:otherwise>
!               <xsl:value-of select="@href"/>
!             </xsl:otherwise>
!           </xsl:choose>
!         </xsl:variable>
!         <fo:basic-link color="{$color}" text-decoration="underline" external-destination="{$href}">
            <xsl:apply-templates/>
          </fo:basic-link>
          <xsl:if test="$show-external-urls = 'true' and @href != string(.)">
!           (<xsl:value-of select="$href"/>)
          </xsl:if>
        </xsl:otherwise>
      </xsl:choose>