Results 1 to 24 of 24

Thread: [RESOLVED] How can I change by EMF byte array to jpeg file?

Threaded View

  1. #14
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How can I change by EMF byte array to jpeg file?

    Without going into the nightmare that is Word Automation and its funky object model too much...

    Here is a simple demo that will Automate a reasonably recent version of Word (2000 or newer?) and extract the "page 1" EMF and save it as a disk file in JPEG format after rendering it on top of a white backdrop.

    You need Word installed, but there is no other external dependency aside from GDI+ which should already be installed as part of Windows unless you are still running Win9x or something. Sample document included.

    I chose to ignore margins, which is another factor that results in a somewhat distorted result.

    As far as I could tell from trying a few things there can be many complications such as Sections, Headers and Footers, and probably even more if the document contains tables. Ack, ptui! Word is quite a minefield.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width