[reportlab-users] RE: Creating outlines and bookmarks from Platypus?
Mon, 22 Mar 2004 09:04:54 -0500
Here's the class I use to create bookmarks. You're probably right that it
should inherit from ActionFlowable and not just Flowable; this has always
worked for me anyhow. It would have to be extended further to support nested
""" Utility class to display PDF bookmark. """
def __init__(self, title, key):
self.title = title
self.key = key
def wrap(self, availWidth, availHeight):
""" Doesn't take up any space. """
return (0, 0)
# set the bookmark outline to show when the file's opened
# step 1: put a bookmark on the
# step 2: put an entry in the bookmark outline
self.key, 0, 0)