pixie question

A discussion forum for the JCommon class library.
Locked
nt
Posts: 2
Joined: Mon Aug 21, 2006 10:38 pm

pixie question

Post by nt » Mon Aug 21, 2006 10:41 pm

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!

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Tue Aug 22, 2006 9:18 am

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

nt
Posts: 2
Joined: Mon Aug 21, 2006 10:38 pm

pixie question

Post by nt » Tue Aug 22, 2006 3:22 pm

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!

Locked