Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

I have a PyQt QPaintEngine for rendering to EMF here (GPL): http://svn.gna.org/viewcvs/veusz/trunk/document/emf_export.py?view=markup

It also uses the PyEMF library. It would be hard to convert this to C++ if necessary.

I just came across this possible solution: EmfEngine. I haven't used it, so YMMV.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top