connecting users of the CorelDRAW family of products

CDSS - CorelDRAW-Style-Sheet - Wow, what the... oh

rated by 0 users
Answered (Verified) This post has 1 verified answer | 1 Reply | 1 Follower

Share  
Page 1 of 1 (2 items) | RSS

Not Ranked
Graz, Austria
Male
Juergen Krausz posted on Mon, Jun 11 2012 4:26

I just discovered there is the new CDSS file format to export styles, at first glance I thougt ... hey, yesss we've got CSS! A dream comes true!

But then I opened the CDSS file and ... ouch, it's binary. It's binary! Crying

Dear Corel Insiders!
Is there any way to get something CSS-like (I mean readable text) out and into
CorelDRAW? Any way to decompile/recompile the binary format?
This would be so awesome!

Answered (Verified) Verified Answer

Not Ranked
Graz, Austria
Male

Wait! Wait a moment.
Hmm.

The file header starts with PK. That's suspicious.
I've tried something and *hehe* yes!
CDSS and CDR as well - it's something we all know.

After a Google search I found out that Brendon Prazner already stumbled upod this fact  here - the fact that the new CorelDRAW file format actually is a ZIP.
So I dont have to worry about telling a secret when I say:

CDR and CDSS as well are ZIP-packed archives, containing an internal structure with several files.
And within this structure there is a directory called styles.
And within this styles directory there is a file called "document.cdss".

And THIS cdss file is *drum roll* Text, CSS-like text!

This is great news!  I now can compose/script CorelDRAW Style Sheets!

Actually the cdss file syntax seems to be JSON rather than CSS but it's perfectly readable if one knows JSON.
That means it can be converted easily to XML vice versa. Wow!
  <edit:> Meh! <~artisticmedia~> this is not going to be valid XML. Anyway, this won't stop me ;-) </edit> 

Thank you Corel! This is awesome!

 

I think I the following has to be said at this point:

Everyone including myself should be aware of the fact that fiddling with the internal components of such a CDR/CDSS/ZIP may break the file - if not crash the whole application when it's loaded. Do that on your own risk! So will I.

Page 1 of 1 (2 items) | RSS
© Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions / User Guidelines.