【发布时间】:2013-11-27 16:12:48
【问题描述】:
我们正在寻找一个 sdk 来从 .NET 应用程序创建复杂的 pdf 文档 到目前为止,我们使用了“aspose for pdf”,从 HTML 到 pdf 功能还可以 因为在生成它时崩溃取决于 我们添加到 pdf 中的 html 块的复杂性/css 样式(要求 4) 这就是为什么 aspose 不是我们的选择。 我们的强制性要求是
1 自动生成带有页面信息的目录(toc) (不是 pdf 书签!)
每页底部2个自动页码(第x页,y页)
3 添加文本章节或标题 目录中的参考资料, 重要:章节编号 1、1.1、1.1.1、1.1.1.2 等必须自动生成!
4 添加 html -> pdf 元素,文档包含然后混合一个 章节结构, 格式化不是 html 文本元素, 图片, html部分
生成的pdf的内容和结构应该是这样的
document title
<any text> etc.
-- endofpage --
table of content
1 mainchapter .............. page 1
1.1 subchapter .............. page 1
2 mainchapter ............... page 3
2.1 subchapter .............. page 3
2.1.1 subchapter ............ page 3
etc.
-- endofpage --
1 mainchapter <<< chapter number have to be generated automatically depending on the document structure and actualize if the content or structure changes!
1.1 subchapter
<any text> etc.
<html formated text> <<< any valid html block should be rendered,
css styles that can't be interpreted should be ignored
-- endofpage --
<image>
<any text> etc.
etc.
-- endofpage --
2 main chapter
<any text> etc.
<image>
<image>
<any text> etc.
到目前为止,我们没有找到任何提供自动章节编号的 sdk 虽然 pdfcreator 和 pdftron 提供了稳定的 html 渲染,但我们缺少 文档标题/章节中的任何 TOC 功能。
经过 3 天的谷歌搜索和样本评估,到目前为止,我们没有找到任何工具。 有人有提示吗?
感谢您的任何想法。 卡格尔
【问题讨论】:
-
我怀疑你根本没有找到任何工具。如果您说明您已经关闭了哪些工具,这可能会有所帮助。
-
如果您的 SDK 允许您使用格式化文本创建新页面 + 浏览书签,那么您可以轻松编写生成所需 TOC 的代码。