有没有办法添加与pdf文档中的文本不同的书签

发布于 2024-09-28 13:27:17 字数 209 浏览 1 评论 0原文

使用 migradoc,我看到如何通过执行以下操作自动添加书签:

Paragraph p1 = document.LastSection.AddParagraph("Project Updates", "Heading2");

但是如果我想添加一个显示“更新”的书签,但段落标题中的文本显示“我的项目更新”,

这可能吗?

using migradoc, i see how you can add a bookmark automatically by doing this:

Paragraph p1 = document.LastSection.AddParagraph("Project Updates", "Heading2");

but what if i want to add a bookmark that says "Updates" but the text in the paragraph header says "My Project Updates"

is that possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眸中客 2024-10-05 13:27:17

当我需要没有可见文本的书签时,我使用了一种技巧:字体大小非常小的白色文本(0.01)。

我还创建了一个样式“Heading1WithoutBookmark”,它是 Heading1 的克隆,但使用

style.ParagraphFormat.OutlineLevel = OutlineLevel.BodyText;

此样式可以使书签指向仅包含图像的页面,而文本显示在下一页上。
它还允许在页面和书签中使用不同的文本。

When I needed bookmarks without visible text, I used a hack: white text with a very small font size (0.01).

I also created a style "Heading1WithoutBookmark" that is a clone of Heading1 but with

style.ParagraphFormat.OutlineLevel = OutlineLevel.BodyText;

This allows me to have the bookmark point to a page that only contains an image while the text is showing on the following page.
It also allows to have different text on the page and in the bookmark.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文