2021-08-10 15:41:18 +02:00
|
|
|
def getBookmarks(pdf):
|
2021-09-01 19:41:10 +02:00
|
|
|
"""Get the bookmarks for a PDF as a list of tuples of the form:
|
2021-08-10 15:41:18 +02:00
|
|
|
(level : int, page : int, text : string, openstatus : bool)"""
|
2021-07-26 20:50:33 +02:00
|
|
|
|
2021-08-10 15:41:18 +02:00
|
|
|
def setBookmarks(pdf, marks):
|
2021-09-01 19:41:10 +02:00
|
|
|
"""Set the bookmarks for a PDF as a list of tuples of the form:
|
2021-08-10 15:41:18 +02:00
|
|
|
(level : int, page : int, text : string, openstatus : bool)"""
|
2022-01-23 14:06:53 +01:00
|
|
|
|
|
|
|
def getBookmarksJSON(pdf):
|
|
|
|
"""Get the bookmarks in JSON format."""
|
|
|
|
|
|
|
|
def setBookmarksJSON(pdf, data):
|
2024-04-17 01:59:48 +02:00
|
|
|
"""Sets the bookmarks from JSON bookmark data."""
|
2022-01-23 14:06:53 +01:00
|
|
|
|
|
|
|
def tableOfContents(pdf, font, fontsize, title, bookmark):
|
2024-04-17 01:59:48 +02:00
|
|
|
"""Typesets a table of contents from existing bookmarks and prepends it to
|
|
|
|
the document. If bookmark is set, the table of contents gets its own
|
|
|
|
bookmark."""
|