PDF-Outline

#ifndef MUPDF_FITZ_OUTLINE_H
#define MUPDF_FITZ_OUTLINE_H

#include “mupdf/fitz/system.h”
#include “mupdf/fitz/context.h”
#include “mupdf/fitz/link.h”
#include “mupdf/fitz/output.h”

/* Outline */

/**
fz_outline is a tree of the outline of a document (also known
as table of contents).

title: Title of outline item using UTF-8 encoding. May be NULL
if the outline item has no text string.

uri: Destination in the document to be displayed when this
outline item is activated. May be an internal or external
link, or NULL if the outline item does not have a destination.

page: The page number of an internal link, or -1 for external
links or links with no destination.

next: The next outline item at the same level as this outline
item. May be NULL if no more outline items exist at this level.

down: The outline items immediate children in the hierarchy.
May be NULL if no children exist.


 fz_outline 是文档大纲的树(也称为
作为目录)。

标题:使用 UTF-8 编码的大纲项的标题。 可能为 NULL
如果大纲项没有文本字符串。

uri: 文档中要显示的目的地
大纲项目被激活。 可能是内部或外部
链接,如果大纲项没有目标,则为 NULL。

page:内部链接的页码,或 -1 表示外部链接
链接或没有目的地的链接。

next:与此大纲同级的下一个大纲项
物品。 如果此级别不存在更多大纲项,则可能为 NULL。

down:大纲项目在层次结构中的直接子项。
如果不存在孩子,则可能为 NULL。

*/
typedef struct fz_outline
{
int refs;
char *title;
char *uri;
int page;
float x, y;
struct fz_outline *next;
struct fz_outline *down;
int is_open;

/* sumatrapdf: support color and flags */
int flags;
int n_color;
float color[4];

} fz_outline;

/**
Create a new outline entry with zeroed fields for the caller
to fill in.
为调用者创建一个带有归零字段的新大纲条目填写。
*/
fz_outline *fz_new_outline(fz_context *ctx);

/**
Increment the reference count. Returns the same pointer.

Never throws exceptions.
增加引用计数。 返回相同的指针。

从不抛出异常。

*/
fz_outline *fz_keep_outline(fz_context *ctx, fz_outline *outline);

/**
Decrements the reference count. When the reference point
reaches zero, the outline is freed.

When freed, it will drop linked	outline entries (next and down)
too, thus a whole outline structure can be dropped by dropping
the top entry.

Never throws exceptions.

减少引用计数。 当参考点
达到零,轮廓被释放。

释放后,它将删除链接的大纲条目(下一个和下一个)
同样,因此可以通过删除来删除整个轮廓结构
顶部条目。

从不抛出异常。

*/
void fz_drop_outline(fz_context *ctx, fz_outline *outline);

#endif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值