使用 libharu 和 vala 创建 pdf
我想知道是否有人可以指导我如何从 vala 语言动态创建 pdf 文件(无需将文件另存为 pdf)。我听说这可以用 libharu 来完成,所以我一直在研究他们的文档,但对我来说仍然有点模糊。有谁知道如何...
从使用 vala 创建的 UI 发送书面注释/文本到 libharu?并让libharu从中创建一个pdf文件?
非常感谢您的帮助。谢谢!
i was wondering if anyone could give me pointers on how to go about creating pdf files dynamically(without having to save the file as a pdf) from the vala language. i heard it can be done with libharu so ive been looking into their documentation but its still kinda hazy for me. does anyone know how to go about...
sending written annotations/text from a UI created with vala, to libharu? and having libharu create a pdf from it?
help would be much appreciated. thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使问题很老,我也需要类似的东西......
正如 nemequ 所说,你需要编写一个 vapi 来包装库。
这是一个基于 libhpdf 2.0.8(不是最新的)的最小版本
=== 文件名:haru.vapi ===
然后你可以从 vala 使用它。
=== 文件名:text_demo.vala ===
编译(在 Windows 上尝试过,您需要调整路径):
并运行:
Even if the question is quite old I was in need of something similar...
As nemequ said you need to write a vapi to wrap the library.
This is a minimal one based on libhpdf 2.0.8 (not the latest)
=== Filename: haru.vapi ===
Then you can consume it from vala.
=== Filename: text_demo.vala ===
To compile (tried on windows you'll need to tweak the paths):
And to run: