PDF Bookmarks, Can't Turn Off

Having trouble installing Oxygen? Got a bug to report? Post it all here.
jgreen
Posts: 10
Joined: Sun Oct 18, 2009 7:29 am
Location: Waterloo, Ontario, Canada

PDF Bookmarks, Can't Turn Off

Post by jgreen »

Hello,

I am trying to turn off the PDF bookmarks for PDF output from DocBook. I have set fop.extensions to 0, but the bookmarks are still there. I am using the built-in Apache FOP in Oxygen 11.

Thanks
John
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Bookmarks, Can't Turn Off

Post by sorin_ristache »

Hello,

You have to set also fop1.extensions to 0 for disabling PDF bookmarks in the output. By default it is set to 1 in the Oxygen predefined scenario.


Regards,
Sorin
jgreen
Posts: 10
Joined: Sun Oct 18, 2009 7:29 am
Location: Waterloo, Ontario, Canada

Re: PDF Bookmarks, Can't Turn Off

Post by jgreen »

Hi Sorin,

I have both fop.extensions and fop1.extensions set to 0 in my customization layer and still get bookmarks. However, when I edit my transformation scenario and look at the parameters, fop1.extensions reads 1. When I set it to 0 in the Configure parameters dialog and run the transformation, it ends with the error "The process 'FOP' ended with code: 1. The error was: License file saxon-license.lic not found. Running with licensable features disabled 20-Nov-2009 12:06:23 PM org.apache.fop.fonts.FontInfo notifyFontReplacement" as well as many warnings. If I set fop1.extensions back to 1, the transformation runs and I get the bookmarks. I saved the error and warnings to a file but I can't see how to attach it to this post.

Thanks
John
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Bookmarks, Can't Turn Off

Post by sorin_ristache »

Please send the file using the Technical Support form.

The message License file saxon-license.lic not found. Running with licensable features disabled is only a warning that will not have impact on the FO transformation. We need to look at the error messages that follow that warning.


Regards,
Sorin
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: PDF Bookmarks, Can't Turn Off

Post by sorin_ristache »

Thank you for the error message. It seems the DocBook stylesheet generates a FO flow element xsl-region-body that cannot be matched with a region-body element. Is your DocBook XML document valid when you transform it to PDF? If yes can you send a sample DocBook XML file for reproducing the error?


Regards,
Sorin
jgreen
Posts: 10
Joined: Sun Oct 18, 2009 7:29 am
Location: Waterloo, Ontario, Canada

Re: PDF Bookmarks, Can't Turn Off

Post by jgreen »

Hello Sorin,

Yes, my documents are valid when I do the transform.

I have isolated the cause of the error. It is the line
<xsl:param name="double.sided">1</xsl:param>
in my stylesheet.

Setting fop1.extensions to 0 will bring on the error in the skeleton DocBook 5 file and skeleton xsl transformation below.


<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5 ... ocbook.rng" type="xml"?>
<book xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<info>
<title>Book Template Title</title>
<author>
<orgname>Organization Name</orgname>
<address>
<city>City</city>
<street>Street</street>
<postcode>000000</postcode>
<country>Country</country>
</address>
<email>user@example.com</email>
</author>
</info>
<part>
<title>First Part</title>
<subtitle>Subtitle of First Part</subtitle>
<chapter>
<title>Chapter Title</title>
<subtitle>Subtitle of Chapter</subtitle>
<sect1>
<title>Section1 Title</title>
<subtitle>Subtitle of Section 1</subtitle>
<para>Text</para>
</sect1>
</chapter>
</part>
</book>


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:d="http://docbook.org/ns/docbook"
xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<!-- Import stock DocBook code for fo -->
<xsl:import href="docbook.xsl"></xsl:import>

<!-- Set doube-sided output -->
<xsl:param name="double.sided">1</xsl:param>

</xsl:stylesheet>
jgreen
Posts: 10
Joined: Sun Oct 18, 2009 7:29 am
Location: Waterloo, Ontario, Canada

Re: PDF Bookmarks, Can't Turn Off

Post by jgreen »

Hello Again,

This seems to be a problem with the way the fo processor works and not Oxygen. Bob Stayton suggests the workaround

<xsl:template match="*" mode="fop1.outline"/>

to allow double.sided=1 and fop1.extensions=1.

Thanks for your help.

John
Post Reply