PDF bookmarks (was: Re: extensions to FO)

Kelly, David,

> The problem I have with this syntax is it's depending on the bookmark-level
> attribute to determine where it is in the hierarchy rather than just using a
> hierarchy via XML. I'm assuming that a bookmark with level 2 is just added
> to the previous bookmark with a level="1". I think using the inherent
> hierarchy structures available with XML would be a nicer solution.

I concur. Moreover, I think it the particular case of PDF bookmarks, we can
implement them within the XSL CR. I have already proposed this idea to
Sebastian some months ago; it seemed to me that he wasn't really contrary,
so I retry  :-).

My proposal is to use fo:markers  with a special role - like this:

<fo:marker role="bookmark">1 Introduction</fo:marker>

The hierarchy of bookmarks will be established by the hierarchy of parent
objects of the respective markers - in exactly the same way as it occurs for
"normal" markers. This is restrictive with respect to what can be expressed by
bookmarks in PDF (there, bookmark sequence and hierarchy can be completely
unrelated to the arrangement of the document locations pointed to by the
bookmarks). My opinion is that this is not very critical - all "normal" bookmark
usages are like table-of-contents to outline the physical structure of the
document, and this is captured (and enforced) perfectly with this proposal.
At worst, one can add a couple of extension attributes to specify the parent
and the preceding entry in the outline tree, or introduce a more complex
syntax inside the "role" attribute".

A further (small) advantage of such a solution is that you will be able
to use one and the same element for bookmarks and running headers
(if you like; if you don't, you are free not to do it). A typical chapter
would begin like this:

<fo:block>
  <fo:marker marker-class-name="chapter"
      role="bookmark">1 Introduction</fo:marker>
  <fo:block font-weight="bold">1 Introduction</fo:block>
...
</fo:block>

Another advantage: an application that does not support bookmarking will
need no extra effort to ignore it - fo:markers are invisible :-).

Comments are appreciated.

Regards,
Nikolai

Received on Saturday, 3 February 2001 11:02:44 UTC