What Microsoft writes... only Microsoft reads.
What Microsoft writes... only Microsoft reads.
This caption triggers some unpleasant deja-vu. The latest example in my confined and restricted world is reading wmf files.
Some wmf-files of an "older sort" are not readable using the Delphi TMetaFile implementation. Specifically i needed to extract the thumbnails from OOXML files (docx, xmlsx, pptx).
It seems like these wmfs (when saved by office 2010 (2012?) and down) has a different header that does not even correspond to the specifications that indeed are out there.
Mucho frustrating. The lifesaver this time was http://www.bilsen.com/gdiplus/index.shtml. Unfortunately the MS library reads (paints?) a wmf much slower than Delphi (there might be some settings or tricks to amend this, though).
http://www.bilsen.com/gdiplus/index.shtml
This caption triggers some unpleasant deja-vu. The latest example in my confined and restricted world is reading wmf files.
Some wmf-files of an "older sort" are not readable using the Delphi TMetaFile implementation. Specifically i needed to extract the thumbnails from OOXML files (docx, xmlsx, pptx).
It seems like these wmfs (when saved by office 2010 (2012?) and down) has a different header that does not even correspond to the specifications that indeed are out there.
Mucho frustrating. The lifesaver this time was http://www.bilsen.com/gdiplus/index.shtml. Unfortunately the MS library reads (paints?) a wmf much slower than Delphi (there might be some settings or tricks to amend this, though).
http://www.bilsen.com/gdiplus/index.shtml
I seem to recall that there are three formats, WMF, EMF and EMF+ - which format gives you troubles?
ReplyDelete'Some wmf-files of an "older sort"'... 'Specifically i needed to extract the thumbnails from OOXML files (docx, xmlsx, pptx).
ReplyDeleteIt seems like these wmfs (when saved by office 2010'...
I guess you have to dive into the spec to identify the version, and the issues. Perhaps it is possible to filter out content that is incompatible?
ReplyDeletehttp://msdn.microsoft.com/en-us/library/cc250370.aspx
The point of the post was that using GdiPlus instead of the Delphi RTL is one solution to this problem. Sorry for not being clear enough.
ReplyDeleteAh, LOL! :D
ReplyDeleteMy bad - you can blame the reader for being dense :D
Lars Fosdal Or those glasses... ;)
ReplyDelete