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

*** Please report new bugs here! ***

Moderator: Dreamer

Post Reply
User avatar
m.Th.
XnThusiast
Posts: 1491
Joined: Wed Aug 16, 2006 6:31 am
Contact:

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

Post by m.Th. » Thu Feb 01, 2018 8:49 am

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 15 times
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
xnview
Author of XnView
Posts: 30264
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview » Sat Feb 03, 2018 1:46 pm

but i don't support open office files
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1491
Joined: Wed Aug 16, 2006 6:31 am
Contact:

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

Post by m.Th. » Sat Feb 03, 2018 3:38 pm

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. :)
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

User avatar
xnview
Author of XnView
Posts: 30264
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

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

Post by xnview » Sun Feb 04, 2018 4:16 pm

no i don't support this format :) it's the thumbnail return by windows explorer...
Pierre.

User avatar
m.Th.
XnThusiast
Posts: 1491
Joined: Wed Aug 16, 2006 6:31 am
Contact:

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

Post by m.Th. » Sun Feb 04, 2018 6:01 pm

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.
m. Th.

The Ascetic Experience - The best photos and texts from Holy Mountain (Athos)

- Dark Themed XnViewMP 0.90 64bit & XnView 2.00 x64 on Win7 x64 -

Post Reply