tags:

views:

161

answers:

3

I'm looking to create some PDF's from Python.

I've noticed that some pdf's have sidebar text that allows you to see the context of occurrences of search terms.

e.g. search for "dictionary"

View in Sidebar:

Page 10 Assigning a value to an existing dictionary key simply replaces the old value with a new one.

How is that done?

Is there anyway to convert existing PDFs to render this sidebar text?

A: 

I believe what you're referring to are bookmarks. The first hit on Google indicates that you can put them in by hand with Acrobat Pro.

The DocBook XSL templates when used with Apache FOP

easel
+1  A: 

If you use Reportlab to generate your pdfs, then there are facilities in the library to bookmark as you want. Checkout the bookmarkPage method on page 54 of the documentation.

Pinochle
A: 

The PyQt gui toolkit has support for creating PDF's. See for example: Printing Rich Text with Qt

Wim Verhavert