4

我需要一个在 Android 和 iOS 上运行的 C++ 库,可用于创建 PDF 文档。

到目前为止,我找到了 libHaru

libHaru 是一个免费的、跨平台的、用于生成 PDF 文件的开源库。

这个库看起来不错,我已经找到了一个关于如何在 iOS 中使用它的工作示例。

但我希望有一个不那么“低级”的库,因为在 libHaru 中你必须手动创建新页面、换行符等。所以问题是是否有人可以建议我任何可以在 Android 和 iOS 上运行的 C++ 库并且是更高一点的水平。

作为奖励:如果该库也是免费的(如自由)或至少可以免费使用,那就太好了。

编辑:我已经尝试过 Qt,但在如此早期的开发阶段使用它相当笨拙(关于 iOS 和 Android 开发)。我希望能提供一个稳定的库并提供良好的文档。

4

1 回答 1

4

You can use Qt for that. The class you would be looking for is QPdfWriter The nice thing about it is, that as you draw onto that thingy, you can replace the QPdfWriter with different kinds of QPaintDevices, like QWidget or QImage and so forth. It's very generic and high level, but Qt is also quite big.

于 2013-06-05T12:16:18.433 回答