Page 1 of 1

pixie question

Posted: Mon Aug 21, 2006 10:41 pm
by nt
Hi,

I am getting a java.io.IOExcetion when I try the following line:

WmfFile wmfFile = new WmfFile(fis, -1,-1);

The stack trace states that "The given file is not a real metafile". I am extracting metafiles from ppts and then processing them, so I am not sure where this message is coming from.

Please help - thank you so much in advance!

Posted: Tue Aug 22, 2006 9:18 am
by Taqua
Hi,

I'm quite sure, your metafile is missing the required header. Pixie checks for the magic numbers in these headers and grabs some additional information from there. Also: Pixie does only read WMF files (which is equal to the Windows 3.0/3.1 API), and not EMF files (Windows 9x and higher).

Regards,
Thomas

pixie question

Posted: Tue Aug 22, 2006 3:22 pm
by nt
Thomas,

Thank you for your response. I was wondering if you have any suggestions on how to (a) fix this and/or (b) detect this? Is there a particular property of certain wmf's that makes them lack metadata? I am specifically dealing with wmf's - I check that that is the file format before I use any of the pixie API.

Thanks again!