The Corel DRAW files reverse-engineering story gets “curiouser and curiouser”. The libcdr project managed to do something even Corel was not capable of.
Simply put, this free library for reading and converting CDR files to SVG is now able to read all CDR files — from v1 to the latest v16. Yes, folks, libcdr holds Waldo firmly in the hands of higher justice. Let me explain this.
Who is this Waldo guy anyway?
Early versions of Corel DRAW, codenamed Waldo, used a file format which had nothing to do with the current way of storing information in CDR files. That was around 1987, back when operating systems were 16bit.
In 1992 Corel released Corel DRAW v3 where it had switched to their first RIFF-based file format. The v5, released few years later, was the last version that was able to read v1 and v2 files, and it already could only save v3 and v4 files. And thus Waldo was buried, until just now.
Are you ready for a time travel? Fridrich Strba, lead developer of libcdr, graciously provided a screenshot of Corel DRAW v2 running from DOSBox with this illustration:
After conversion to SVG:
More changes
The library now also preserves groups of objects when converting to SVG and has basics of handling spot colors, albeit getting this to work reliably is going to be a tough task (but personally I have high hopes for SVG2).
Building libcdr
It is still recommended to use libcdr from Git repository and stay updated.
Fetch it:
$ git clone git://anongit.freedesktop.org/libreoffice/libcdr
Build it:
$ ./autogen.sh && ./configure && make && sudo make install
Use it:
$ cdr2xhtml file.cdr > file.xhtml
Then open the XHTML file in a text editor, trim the XHTML bits and save the result as .svg
to open in Inkscape.
What’s next
Getting full сoverage of file formats is what delayed work on support for text objects. Now that it’s mostly done, developers are likely to get back to text and maybe even improve support for gradient fills.
The library will be used in upcoming LibreOffice 3.6.
Patreon subscribers get early access to my posts. If you are feeling generous, you can also make a one-time donation on BuyMeACoffee.