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] Re: No PDF draft watermark included with xsltproc


On Thu, Jul 31, 2003 at 12:38:28PM +0200, Steinar Bang wrote:
> >>>>> Bob Stayton <bobs@sco.com>:
> 
> > It works for me, although the watermark image isn't scaled very
> > well.  The word "DRAFT" is scaled too large and gets cut off (XEP
> > gets it right).
> 
> Does the watermark image have to be a pixmap?  Or can it be in a
> scalable format, eg. SVG or EPS (a handwritten image wouldn't be many
> lines in either), as long as the FO->PDF translator can handle the
> format? 
> 
> > The only tools difference is that I'm using versions 2.5.7 of
> > libxml2 and 1.0.30 of libxslt.
> 
> I tried it on a debian testing/unstable (sarge) system, with libxml2
> 2.5.7 and libxslt 1.0.30, and I still didn't get the watermark.
> 
> > The fo output includes:
> 
> > <fo:region-body 
> [snip!]
> > background-image="url(http://docbook.sourceforge.net/release/images/draft.png)" background-attachment="fixed"
> [snip!]
> 
> My .fo files didn't contain the text "background-image".
> 
> I then looked at the settings in my customization layer:
> 
>   <!-- Autogenerate section numbers -->
>   <xsl:param name="section.autolabel" select="1"/>
>   <!-- HTML Toc level (both chunked and unchunked) -->
>   <xsl:param name="toc.section.depth">5</xsl:param>
> 
>   <xsl:param name="paper.type" select="'A4'" />
>   <xsl:param name="fop.extensions" select="1" />
> 
> Removing the paper.type parameter didn't make any difference, but
> removing the fop.extensions did.
> 
> Now it works, even on RH8 with the older libxml2/libxslt, but with the
> same scaling problems you mentioned.  I only get half the "F", and
> lose the "T" completely.
> 
> Unfortunately removing fop.extensions also lost me the navigational
> treeview when viewing the document in acroread.

Ah, yes, it's a "feature".  Prior to version 0.20.5,
FOP did not support background images, so the fop.extensions
turned it off.

If you look in fo/pagesetup.xsl, you will see
lines like these in the page-masters:

<xsl:if test="$draft.watermark.image != ''
              and $fop.extensions = 0">
  <xsl:attribute name="background-image">
    <xsl:call-template name="fo-external-image">
    ...

I'll fix this in CVS, but until then, you will have to
copy pagesetup.xsl, and either change it to $fop.extensions = 1
or remove "and $fop.extensions = 0" entirely,
and include your copy in a customization layer.
That's a workaround until the next release.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

---------------------------------------------------------------------
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]