[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] initial pdf view with index side pane
I had forgotten about that feature, but it doesn't seem to control the bookmarks window pane like Richard requested. When the fop1.extensions param is set to 1, the fop1.xsl stylesheet module is used and outputs standard XSL 1.1 bookmark objects. The 'starting-state' attribute is controlled by the DocBook XSL stylesheet param 'bookmarks.collapse', which was added in version 1.75.1:
The param's default value is 1, which sets starting-state="hide" (which actually hides that bookmark's children, not the bookmark itself), so it only shows the top-level bookmarks.
The DocBook stylesheet violates the strict hierarchy of the document in one way: it promotes all the children of the root element to top level bookmarks. Otherwise the collapsed state would be a single bookmark for the root element, always requiring a click to expand that to something useful. The promotion therefore displays the top-level list of elements like chapters, etc. If 'bookmarks.collapse' = 0, then all those bookmarks are further expanded into the whole hierarchy in the Bookmarks pane.
A little more digging I found this interesting Adobe document entitled Parameters for Opening PDF Files:
I found I could open a PDF file with bookmarks turned off using a command like this:
<path-to-acrobat-reader>/acrobat.exe /a pagemode=none filename.pdf
That Adobe document also provides URL syntax for setting this feature, so if your PDF is being served by HTTP, you could include the setting in the URL.
As far as getting this setting into the PDF document itself, the Antenna House doc says it supports setting pagemode in the axf:document-info extension element. And as Mauritz pointed out earlier, XEP suports a processing instruction <?xep-pdf-view-mode?> that lets you set the initial value. But I don't find any such option for FOP.
It's been a while since I played with it, but I'm pretty sure that if you use XSL 1.1 bookmark objects (rather than the FOP extension for bookmarks), then the value of "starting-state" (show or hide) on the top-level bookmark determines if the bookmark pane is initially displayed. I'm pretty sure this works in FOP 1.0.
From: Bob Stayton
Just for comparison, I checked the Antenna House and XEP documentation regarding PDF options, and neither of them seem to have an option for hiding or displaying the bookmarks pane. I cannot find it in the FOP doc either. I guess the next question is whether the PDF standard even supports control of the bookmarks pane.
set fop1.extensions to 1. I believe this just generates the TOC information and
doesn't set the initial view to present the TOC in a left-hand pane... However,
I am aware there are a bunch of setting local to my pdf render that may be
fiddling with the initial presentation.
Have you set the param fop1.extensions to 1, this works for me.
From: Bob Stayton [mailto:email@example.com]
This would be a feature of your XSL-FO processor that generates the PDF. If you are using FOP, you need to look at FOP's PDF output configuration, and see if FOP has such a setting. There is no way to do it in DocBook XSL.
Do you mean you want to replace the PDF bookmarks with a back-of-the-book index in the left pane?