From: Ulrich T. <ulr...@gm...> - 2009-05-01 15:37:06
|
Hi Peter, > I'm maintaining an MFC application, and I'd like to be able to export > some simple GDI generated documents to PDF. I see that wxPdfDocument > has the capability of reading a Windows metafile (which essentially > consists of a series of GDI function calls and their parameters): wxPdfDocument's support of WMF files is limited. Not all GDI commands are supported. Especially font support is lacking. > It ought to be possible for me to serialise my document as a windows > Metafile using some MFC facility, perhaps to a temp directory, and > subsequently open that file using bool wxPdfDocument::Image. > > Is this practical, sensible and possible? How tightly coupled is > wxPdfDocument to WxWidgets? wxPdfDocument makes intensive use of the wxWidgets core library (for handling file streams, GIF images, stream compression and so on), so you can't use it without the wxWidgets library itself. Of course you could create a stand-alone command line utility which could perform the WMF to PDF conversion task and call this utility via system call (CreateProcess) from your own application. > The only other way that I can find of doing this entails purchasing > an extremely overpriced licence for a commercial library. There exist low cost solutions for WMF to PDF conversion. You might even consider to use an open source solution like ImageMagick. Regards, Ulrich |