Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
7858 views
1
#ifndef MUPDF_FITZ_OUTLINE_H
2
#define MUPDF_FITZ_OUTLINE_H
3
4
#include "mupdf/fitz/system.h"
5
#include "mupdf/fitz/context.h"
6
#include "mupdf/fitz/link.h"
7
#include "mupdf/fitz/output.h"
8
9
/* Outline */
10
11
/*
12
fz_outline is a tree of the outline of a document (also known
13
as table of contents).
14
15
title: Title of outline item using UTF-8 encoding. May be NULL
16
if the outline item has no text string.
17
18
dest: Destination in the document to be displayed when this
19
outline item is activated. May be FZ_LINK_NONE if the outline
20
item does not have a destination.
21
22
next: The next outline item at the same level as this outline
23
item. May be NULL if no more outline items exist at this level.
24
25
down: The outline items immediate children in the hierarchy.
26
May be NULL if no children exist.
27
*/
28
29
typedef struct fz_outline_s fz_outline;
30
31
struct fz_outline_s
32
{
33
char *title;
34
fz_link_dest dest;
35
fz_outline *next;
36
fz_outline *down;
37
int is_open;
38
};
39
40
/*
41
fz_print_outline_xml: Dump the given outlines as (pseudo) XML.
42
43
out: The file handle to output to.
44
45
outline: The outlines to output.
46
*/
47
void fz_print_outline_xml(fz_context *ctx, fz_output *out, fz_outline *outline);
48
49
/*
50
fz_print_outline: Dump the given outlines to as text.
51
52
out: The file handle to output to.
53
54
outline: The outlines to output.
55
*/
56
void fz_print_outline(fz_context *ctx, fz_output *out, fz_outline *outline);
57
58
/*
59
fz_drop_outline: Free hierarchical outline.
60
61
Free an outline obtained from fz_load_outline.
62
63
Does not throw exceptions.
64
*/
65
void fz_drop_outline(fz_context *ctx, fz_outline *outline);
66
67
#endif
68
69