如何在 GTK 中显示 PostScript 文件?
有谁知道如何获取 PostScript 文件并将其显示在 GTK+ 应用程序中?
我一直在尝试使用 ImageMagick++ 打开 PostScript 文件(效果很好),然后以某种方式将其作为 GtkWidget 中的图像打开。如果我让 ImageMagick++ 将 PostScript 文件保存为 PNG 图像,然后在 GtkWidget 中打开 PNG 图像,我就可以做到这一点,但我想避免仅仅因为我想显示它而保存文件。
我也一直在尝试使用 ImageMagick++ Blob 对象,但我无法让 GTK+ 读取 Blob 中的图像。
感谢您的任何帮助。
Does anyone know how to take a PostScript file and display it in a GTK+ application?
I've been trying to use ImageMagick++ to open a PostScript file (which it does just fine), and then somehow open it as an Image in a GtkWidget. I can do this if I have ImageMagick++ save the PostScript file as a PNG image, and then open the PNG image in the GtkWidget, but I'd like to avoid saving a file just because I want to display it.
I've also been playing with using the ImageMagick++ Blob object, but I haven't been able to have GTK+ read the image in the Blob.
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Gnome 文档查看器 Evince 有一个可重用的小部件,用于查看其 libevince 库中的 Postscript 文件。但我不知道在哪里下载它或文档在哪里。
The Gnome document viewer Evince has a reusable widget for viewing Postscript files in its libevince library. I don't know where to download it or where the documentation lives, though.
ptomato 的方向是正确的,在 gtk 中显示 ps/pdf 文档的最简单方法是使用 libevview 和 libevdocument (两者都是 evince 项目的一部分)
文档:
ptomato is in right direction, the easiest way to display a ps/pdf document inside gtk is use libevview and libevdocument (both are part of evince project)
Documentation: