This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Suppressing hyperlinks in PDF


Hi Warren,
I presume you are talking about ulinks here.  If so, you are looking for the
template with match="ulink" in fo/xref.xsl.  Copy that template to your
customization layer and trim it down to just the following:

    <xsl:choose>
      <xsl:when test="count(child::node())=0">
        <xsl:call-template name="hyphenate-url">
          <xsl:with-param name="url" select="@url"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>

That removes the <fo:basic-link> wrapper so no link will be formed and just
the ulink text (or URL if it is empty) will appear.  It also removes the URL
reference that follows in square brackets.  That reference can also be
turned off by setting the $ulink.show parameter to zero.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Warren Young" <warren@etr-usa.com>
To: "docbook-apps List" <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, May 10, 2005 9:55 AM
Subject: [docbook-apps] Suppressing hyperlinks in PDF


> I generate both HTML and PDF versions of my DocBook document.  Most of
> the hyperlinks go to the HTML version of another [non-DocBook] manual.
> This is fine for the HTML version, but in the PDF these hyperlinks come
> out as URLs in brackets, which don't point to the right location even if
> they were clickable, because I move the finished PDF from where it is
> generated.
>
> Therefore, I'd like to suppress the generation of hyperlinks in the PDF,
> somehow.  I imagine you could do this by overriding the rule in the
> fo/docbook.xsl stylesheet that passes the hyperlink info on to the FO
> file.  I know how to do an override, but I don't know _what_ to override
> to make this happen.
>
> For what it's worth, I am using FOP to go from the FO file to a PDF.
> Perhaps there is a way to make FOP do this instead, but it seems cleaner
> to do it by modifying/overriding the stylesheet; that's what stylesheets
> are for, after all, correct?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]