ipdf_bookmark.h
书签:书签树的读取与维护。
Les descriptions d'interface restent en anglais, telles quelles dans les en-têtes : vous pouvez les comparer directement au code.
Constantes
| Signature | Value | Description |
|---|---|---|
| PDF_BOOKMARK_ITALIC | 1 | Italic style of bookmark item. |
| PDF_BOOKMARK_BOLD | 2 | Bold style of bookmark item. |
class IPDF_Bookmark
PDF bookmark(outline item) interface.
Méthodes(11)
| Signature | Description |
|---|---|
| Release() | Release a bookmark object. |
| GetTitle() | Get the title. A unicode encoded string is returned. |
| GetTitleUTF8() | Get the title. A utf8 encoded string is returned. |
| SetTitle(const wchar_t* title) | Set the title of a bookmark item. |
| SetTitle(const char* title_utf8) | Set the title of a bookmark item. |
| GetColor() | Get the color. In Windows COLORREF format: 0x00ggbbrr. |
| SetColor(unsigned int color) | Set the color of a bookmark item. |
| GetFontStyle() | Get the font style. Italic and/or bold. |
| SetFontStyle(int style) | Set the fontstyle of a bookmark item. |
| GetDestInfo(PDSDK_Dest* dest, IPDF_Document* sdk_doc) | Get the destination of a bookmark item. |
| SetDestInfo(const PDSDK_Dest* dest, IPDF_Document* sdk_doc) | Set the destination of a bookmark item. |
SetTitle
void SetTitle(const wchar_t* title) = 0;
Set the title of a bookmark item.
Paramètres
title(in) — The new title(unicode) of the bookmark item.
SetTitle
void SetTitle(const char* title_utf8) = 0;
Set the title of a bookmark item.
Paramètres
title(in) — The new title (utf8) of the bookmark item.
SetColor
void SetColor(unsigned int color) = 0;
Set the color of a bookmark item.
Paramètres
color(in) — The new color of the bookmark item.
SetFontStyle
void SetFontStyle(int style) = 0;
Set the fontstyle of a bookmark item.
Paramètres
color(in) — The new fontstyle of the bookmark item. Italic and/or bold. See PDF ref 8.2.2 for the details
GetDestInfo
void GetDestInfo(PDSDK_Dest* dest, IPDF_Document* sdk_doc) = 0;
Get the destination of a bookmark item.
Paramètres
dest(out) — Receiv the destination information.sdk_doc(in) — The PDF document.
SetDestInfo
void SetDestInfo(const PDSDK_Dest* dest, IPDF_Document* sdk_doc) = 0;
Set the destination of a bookmark item.
Paramètres
dest(in) — The new destination.sdk_doc(in) — The PDF document. NOTE: If the bookmark has action, the action will be removed.
class IPDF_BookmarkTree
PDF bookmark(outline) tree interface.
Méthodes(7)
| Signature | Description |
|---|---|
| Release() | Release a bookmark tree object. |
| GetFirstChild(const IPDF_Bookmark* parent) | Get the first child bookmark of specified parent bookmark. |
| GetNextSibling(const IPDF_Bookmark* bookmark) | Get the next sibling bookmark of specified bookmark in the same level. |
| InsertBookmark(const wchar_t* title, IPDF_Bookmark* parent, IPDF_Bookmark* …) | New a bookmark item and insert into bookmark tree. |
| InsertBookmark(const char* title_utf8, IPDF_Bookmark* parent, IPDF_Bookmark…) | New a bookmark item and insert into bookmark tree. |
| MoveBookmark(IPDF_Bookmark* bookmark, IPDF_Bookmark* parent_moveto, IPDF_…) | Move a bookmark item to specified level. |
| RemoveBookmark(IPDF_Bookmark* bookmark) | Remove a bookmark item from bookmark tree. |
GetFirstChild
IPDF_Bookmark* GetFirstChild(const IPDF_Bookmark* parent) = 0;
Get the first child bookmark of specified parent bookmark.
Paramètres
parent(in) — The input parent bookmark.
Retour:The first child bookmark.
GetNextSibling
IPDF_Bookmark* GetNextSibling(const IPDF_Bookmark* bookmark) = 0;
Get the next sibling bookmark of specified bookmark in the same level.
Paramètres
bookmark(in) — The input bookmark.
Retour:The next sibling bookmark.
InsertBookmark
IPDF_Bookmark* InsertBookmark(const wchar_t* title, IPDF_Bookmark* parent, IPDF_Bookmark* insert_after) = 0;
New a bookmark item and insert into bookmark tree.
Paramètres
title(in) — The unicode title of new bookmark.parent(in) — The parent of new bookmark. Can be 0, if insert_after not NULL or it will be the first item of the tree.insert_after(in) — The item after which the new item is to be inserted. If 0, will be inserted to the first child of parent.
Retour:The new item if successful; otherwise 0.
InsertBookmark
IPDF_Bookmark* InsertBookmark(const char* title_utf8, IPDF_Bookmark* parent, IPDF_Bookmark* insert_after) = 0;
New a bookmark item and insert into bookmark tree.
Paramètres
title(in) — The utf8 title of new bookmark.parent(in) — The parent of new bookmark. Can be 0, if insert_after not NULL or it will be the first item of the tree.insert_after(in) — The item after which the new item is to be inserted. If 0, will be inserted to the first child of parent.
Retour:The new item if successful; otherwise 0.
MoveBookmark
int MoveBookmark(IPDF_Bookmark* bookmark, IPDF_Bookmark* parent_moveto, IPDF_Bookmark* insert_after) = 0;
Move a bookmark item to specified level.
Paramètres
bookmark(in) — The bookmark to be moved.parent_moveto(in) — The destinate parent which to be inserting.insert_after(in) — The item after which the moving item is to be inserted. If 0, will be inserted to the first child of parent.
Retour:1 if successful; otherwise 0.
RemoveBookmark
void RemoveBookmark(IPDF_Bookmark* bookmark) = 0;
Remove a bookmark item from bookmark tree.
Paramètres
bookmark(in) — The bookmark item to be removed.