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


------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
wxCode-users mailing list
wxCode-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxcode-users

Reply via email to