W3C home > Mailing lists > Public > www-xsl-fo@w3.org > February 2001

RE: PDF bookmarks (was: Re: extensions to FO)

From: Martin Brown <martin.brown@cdcsolutions.com>
Date: Mon, 5 Feb 2001 10:26:42 -0000
To: <www-xsl-fo@w3.org>
Message-ID: <000601c08f5e$220c1990$1445a8c0@docctrl.com>
Hi,

I have written a basic XSL-FO PDF engine that implements bookmarks.   I work for a company that
primarily produces publishing solutions for the pharmaceutical market.   Thus 'fusion2000' is aimed
at this space and must handle PDF specific stuff to be any use.

The way I figured it:
within fo:root I have a separate tree of cdcs:bookmark elements.   Each contains attributes:
o text - the text that appears next to the bookmark
o ref-id - the id to link to
o open - (yes|no) - whether the bookmark is open when the doc is opened

This is implemented as follows; all ids in the document are entered into a named-destination tree
whether they are linked-to or not.   This was for two reasons:
o it was simpler to program ;-)
o it allows me to link to an ID in another document created with fusion2000.

The named-destination tree is used by simple/basic-links too.   The link is made to the first area
inserted by the object with that ID.   IDs are inserted in UTF-16 with the Unicode header.

The ability to explicitly represent arbitrary trees of bookmarks was vital to one sale of this
product.   Also remember that you can invoke any action from a bookmark.   If you are considering a
PDF specific extension to XSL-FO please ensure that it will be extensible to do anything that PDF
permits!   It maybe illogical but someone will need to do it sometime...


Encoding machine-readable meaning within XSL-FO
-----------------------------------------------
Personally, I think this is a loosing battle.   Even though XSL-FO is not a presentation format, it
is aimed at producing a presentation format (PS/PDF/HTML etc).   By the time the information has got
as far as XSL-FO it has been chopped and hacked about.   Even if we can ascribe meaning to
individual paragraphs or tables the ability to reuse this information will probably be limited.
What we really want is the ability to embed the original XSL data records within the output PDF.
Thus you could get the PDF as a presentation format, plus the data used to create the presentation
if you need to play with the data further.

This functionality is present in 'fusion2000' but needs further work.   Getting the file in (it can
be any arbitrary file) works fine but it is too hard to extract at present.   Probably it should
integrate with PDF file-annotions.

Regards

Martin

---
Martin Brown,
Software Engineer
CDC Solutions Ltd
http://www.cdcsolutions.com

Direct contact details:
Tel: 0161 449 0859
Fax: 0161 426 1909
Mobile: 07949 321939
Received on Monday, 5 February 2001 05:28:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:08 GMT