File: c07.tex

package info (click to toggle)
cpdf 2.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,828 kB
  • sloc: ml: 34,724; makefile: 65; sh: 45
file content (83 lines) | stat: -rw-r--r-- 2,522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* CHAPTER 6. Bookmarks */

/*
 * cpdf_startGetBookmarkInfo(pdf) starts the bookmark retrieval process for a
 * given PDF.
 */
void cpdf_startGetBookmarkInfo(int);

/*
 * cpdf_numberBookmarks gets the number of bookmarks for the PDF given to
 * cpdf_startGetBookmarkInfo.
 */
int cpdf_numberBookmarks(void);

/*
 * cpdf_getBookmarkLevel(serial) get bookmark level for the given bookmark
 * (0...(n - 1)).
 */
int cpdf_getBookmarkLevel(int);

/*
 * cpdf_getBookmarkPage gets the bookmark target page for the given PDF
 * (which must be the same as the PDF passed to cpdf_startSetBookmarkInfo)
 * and bookmark (0...(n - 1)).
 */
int cpdf_getBookmarkPage(int, int);

/* cpdf_getBookmarkText returns the text of bookmark (0...(n - 1)). */
char *cpdf_getBookmarkText(int);

/* cpdf_getBookmarkOpenStatus(pdf) is true if the bookmark is open. */
int cpdf_getBookmarkOpenStatus(int);

/* cpdf_endGetBookmarkInfo ends the bookmark retrieval process, cleaning up. */
void cpdf_endGetBookmarkInfo(void);

/*
 * cpdf_startGetBookmarkInfo(n) start the bookmark setting process for n
 * bookmarks.
 */
void cpdf_startSetBookmarkInfo(int);

/*
 * cpdf_setBookmarkLevel(n, level) set bookmark level for the given bookmark
 * (0...(n - 1)).
 */
void cpdf_setBookmarkLevel(int, int);

/*
 * cpdf_setBookmarkPage(pdf, bookmark, targetpage) sets the bookmark target
 * page for the given PDF (which must be the same as the PDF to be passed to
 * cpdf_endSetBookmarkInfo) and bookmark (0...(n - 1)).
 */
void cpdf_setBookmarkPage(int, int, int);

/*
 * cpdf_setBookmarkOpenStatus(n, status) set the open status of a bookmark,
 * true or false.
 */
void cpdf_setBookmarkOpenStatus(int, int);

/* cpdf_setBookmarkText(n, text) sets the text of bookmark (0...(n - 1)). */
void cpdf_setBookmarkText(int, const char[]);

/*
 * cpdf_endSetBookmarkInfo(pdf) end the bookmark setting process, writing the
 * bookmarks to the given PDF.
 */
void cpdf_endSetBookmarkInfo(int);

/* cpdf_getBookmarksJSON(pdf, length) returns the bookmark data and sets the
 * length. */
void *cpdf_getBookmarksJSON(int, int *);

/* cpdf_setBookmarksJSON(pdf, data, datalength) sets the bookmarks from JSON
 * bookmark data. */
void cpdf_setBookmarksJSON(int, void *, int);

/* cpdf_tableOfContents(pdf, font, fontsize, title, bookmark) 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. */
void cpdf_tableOfContents(int, const char[], double, const char[], int);