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: Customizing PDF look and feel using DocBook,Epic Print Composer and XSL-FO


On Tue, Jan 22, 2002 at 10:11:21AM -0800, Tristan Bishop wrote:
> Hi there,
> 
> Good morning. I am at my wits end trying to customize my converted DocBook
> XML to PDF output, and I'm finally getting humble and asking for help.
> 
> 
> SYSTEM:
> 
> I'm on Windows 2000. I'm using the DocBook XML DTD, more accurately, the
> Arbortext ATI XML DocBook V4.0 DTD. This is the DTD that works with the
> Arbortext Epic Print Composer product.
> 
> For styling, I'm using the DocBook 1.48 style sheets that I downloaded from
> Source Forge. I'm also using the Arbortext Epic 4.2 editor, and their Print
> Composer engine.  As far as I know, the Arbortext engine contains Xalan for
> XSL
> processing, as well as some kind of converter (possibly FOP?) to go from
> FO's to
> post script. I'm then using Adobe Acrobat distiller 5.0 for Windows to go
> from PS to PDF.
> 
> (Though I am using the Arbortext DTD, I'm not using any Arbortext
> extensions, nor did I enable these extensions via the Arbortext extensions
> parameter in the DocBook FO style sheets.)
> 
> CONVERSION:
> 
> I was able to successfully generate PDF content using the default source
> forge style sheets. So, to move forward, I then created a customization
> layer, using instructions found at the following websites:
> 
> http://www.dpawson.co.uk/docbook/styling/custom.html
> http://www.nwalsh.com/docs/articles/dbdesign/#parameterization
> 
> As instructed, I placed my custom.xsl file in the FO directory, and used an
> import statement to trigger docbook.xsl.  See below:
> 
> <xsl:import href="docbook.xsl"/>
> 
> That said, I now have two primary, and prohibitive issues:
> 
> ISSUE NUMBER 1) Not all parameters respond to my customization layer.
> 
> I used the FO parameter Reference list found at:
> 
> http://docbook.sourceforge.net/projects/xsl/doc/fo/
> 
> Many of the customized parameters work just fine. Such as:
> 
> <xsl:param name="admon.graphics" select="1"/>
> <xsl:param name="body.font.family">Arial</xsl:param>
> <xsl:param name="title.margin.left" select="'0pc'"/>
> 
> Other recommended customization parameters simply do not change the
> resulting PDF output. Examples of ignored parameters include:
> 
> page.margin.bottom
> page.margin.inner
> page.margin.outer
> page.margin.top
> 
> ISSUE NUMBER 2) The file path to reference graphics is being mangled
> 
> Within my DocBook XML source, I use the <graphic> element to refer to screen
> shots. The syntax is:
> 
> <graphic fileref="abcdefg.jpg"/>
> 
> When I run the conversion, I receive an error message stating:
> 
> [A12630] Error: The graphics file cdefg.jpg could not be opened.
> 
> No matter what the file name or file path, the conversion process cuts of
> the first two letters of the file name. So if my graphic is
> 
> /12345/abcdefg.jpg
> 
> The error will say:
> 
> [A12630] Error: The graphics file 345/abcdefg.jpg could not be opened.
> 
> (BTW, my admonishment graphics (called by the style sheets) show up just
> fine in the PDF output, but not the screen shots.)
> 
> =======
> My questions:
> 
> Why are some parameters ignored?
> What's going on with the <graphic> element?
> Are these troubles because I'm using the ATI XML DocBook V4.0 DTD with the
> Epic print composer?

These margin parameters are known to work in the
1.48 stylesheets. Also, graphics paths are not mangled
as you describe in going from XML to fo output
with either of the XSLT processors I use (Saxon and
xsltproc).

This will be difficult to diagnose if the Arbortext system
is a closed box.  One thing you might look for is an
intermediate *.fo file being created by the Docbook XSL
stylesheet, before it is then processed into PDF
by FOP.  If the *.fo file looks ok, then the problem
is with the FOP processor.  If the .fo file exhibits the
problems, then something is happening upstream,
possibly with the version of Xalan that is included
with Arbortext.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


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