[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Wondering why draft.png image is inserted in fo but not displayed (nor did I ask for the image)
On Thu, Nov 06, 2003 at 05:36:04PM +0100, Sanders, M. wrote: > Hi All, > > I use xsltproc to generate a resolved and profiled docbook xml file > (using docbook-profile.xsl, options --xinclude and --param.os ="linux"). > This works fine. When I check the resolved xml file there is nowhere any > attribute status="draft". When I proces this xml file to a fo file, > again with xsltproc, and process further to pdf with FOP I get a nice > pdf file WITHOUT any watermarks. > I did check when I mark a chapter status="draft" and put in the > customization file (which is very simple only params are set e.g. > paper.type etc.) draft.mode parameter to maybe I do get the chapter > marked draft. When i explicitly set parameter draft.mode to no the image > url is NOT inserted in the fo file. > > Does anybody know why the url to the unused draft images is in the fo > file and FOP looks for them over the network? It took me a while to > figure out why my docbook wouldn't compile to PDF at home (not > networked) but would in the office. > > In the mean time I do know now I can set draft.watermark.image parameter > to a local file. But still, curious, is this meant to be so? Hi Maarten, The default setting for draft.mode is "maybe". That means the draft watermark is output only for pages that have a status="draft" attribute. I think this was intended as a convenience for those who want to turn on the watermark with an attribute and without having to set a parameter. When set to "maybe", the stylesheet does not check to see if there are any instances of status="draft" in the document, it just prepares the FO page-master set so the draft page-masters are available in case they are needed. The reason draft.png is a URL and not a local file path is because the stylesheet cannot manage local files. The stylesheet can only write a path to the FO file, and it is up to the FO processor to locate the draft.png file to integrate it into the PDF. The stylesheet could write a path relative to the stylesheet location, but the FO processor doesn't know the path to the stylesheet directories. The use of a URL is a compromise, and can be a headache for unsuspecting users. Perhaps the default behavior of the stylesheet should be to check to see if the document has a status="draft" attribute anywhere before outputting the draft page-masters. Then you would run into the URL problem only if you are actually trying to use draft mode. 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
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]