Page 1 of 1

The thumbs for the latest Corel Draw files aren't generated anymore

Posted: Thu Feb 01, 2018 8:49 am
by m.Th.
The thumbs for the latest Corel Draw files aren't generated anymore, even if sometime in the past we had them: viewtopic.php?f=62&t=29675

This is because now the CDR files are now in Open Office XML format.

So, take the engine used to open the Office files (IOW handle the CDR file as an zip archive and read the zip) and generate the thumb from thumbnail.png file inside the zip file.

The sample is here:
testedeux.zip
(254.02 KiB) Downloaded 65 times

Re: The thumbs for the latest Corel Draw files aren't generated anymore

Posted: Sat Feb 03, 2018 1:46 pm
by xnview
but i don't support open office files

Re: The thumbs for the latest Corel Draw files aren't generated anymore

Posted: Sat Feb 03, 2018 3:38 pm
by m.Th.
xnview wrote:but i don't support open office files
My mistake: is Office Open XML format (and not Open Office XML) which XnView supports already :) - if you remember - see these posts in a recent thread:

viewtopic.php?f=82&t=36929&sid=ce33a8ae ... 55#p148186

viewtopic.php?f=82&t=36929&sid=ce33a8ae ... 55#p148217

Btw you can test it by yourself using some Office files. :)

Re: The thumbs for the latest Corel Draw files aren't generated anymore

Posted: Sun Feb 04, 2018 4:16 pm
by xnview
no i don't support this format :) it's the thumbnail return by windows explorer...

Re: The thumbs for the latest Corel Draw files aren't generated anymore

Posted: Sun Feb 04, 2018 6:01 pm
by m.Th.
xnview wrote:no i don't support this format :) it's the thumbnail return by windows explorer...
Grrrr.... if you say so...

It is interesting though because my Explorer shows Corel & Inventor thumbs but XnView doesn't.

As I said elsewhere, it would be a golden occasion for you to support this - make a simple method/function/whatever having as a parameter the file name and the name of the preview and as a result will return the thumb. For example:

Code: Select all

image ExtractOOXMLThumb(string myFileName, myThumbName)
Example

myThumb = ExtractOOXMLThumb('c:\foo\test.docx', 'thumbnail.emf')

This Method will treat c:\foo\test.docx as a zip file (you can temporarily rename it if you want) and extract from here the 'thumbnail.emf' (preferably in memory) and use it as a thumbnail.

The name of the thumb is dependent of the file format and I can provide it to you if you want.