本文介绍了从Qt 4.5生成矢量EMF / WMF(Windows图元文件)剪贴板内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们正在将一个庞大的代码库从GDI移到QPainter。我们以前很容易在Windows上使用的一件事是EMF剪贴板格式,它使客户能够以矢量格式操作其他程序(如Office)中的粘贴输出。
我们很容易生成从Qt到EMF的位图,但这并不能使我们恢复旧格式的可编辑性。例如,我们也可以从Postscript制作MIME数据,例如在某些程序中保留向量格式,但不允许在Office中进行可编辑。
由于奇趣科技/诺基亚放弃GDI渲染路径,是否有任何体面的方式来产生QPainter的矢量EMF输出?选项包括第三方库后处理其他输出格式(我们没有看到可用的结果),假打印机驱动程序(它引入了Windows版本特定的问题)。它必须在WinXP上工作 - > 7。
其他人解决了这个问题吗? 解决方案
好吧,现在我发现这里有。接受的答案是它不能轻易完成。如果有人有更好的消息,我很乐意听到。
We are moving a large codebase from GDI to QPainter. One thing we used to get on Windows easily was the EMF clipboard format, which enabled customers to manipulate their pasted output in other programs (like Office) in a vector format.
It's easy for us to produce bitmaps from Qt into EMF, but that really doesn't give us back the editability of the old format. We can also make mime data from Postscript, which in some programs will retain vector format, but won't allow editability in Office, for example.
Since Trolltech/Nokia abandoned the GDI rendering path, is there any decent way to produce vector EMF output from QPainter? Options include 3rd-party libraries postprocessing other output formats (which we haven't seen usable results from), phony printer drivers (which introduce Windows-version specific issues). It has to work on WinXP -> 7.
Has anybody else solved this?
解决方案
Well, now I see that this has been asked and answered here before. The accepted answer there is that it can't be done easily. If anyone has any better news, I'd be happy to hear it.
这篇关于从Qt 4.5生成矢量EMF / WMF(Windows图元文件)剪贴板内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!