papandreou / node-inkscape

The inkscape utility as a readable/writable stream
BSD 3-Clause "New" or "Revised" License
76 stars 10 forks source link

Import CDR File #27

Open FlandersBurger opened 5 years ago

FlandersBurger commented 5 years ago

SVG works like a charm but is there a way to add CDR as the input?

I added this but that wasn't sufficient:


        } else if (inkscapeArg === '--import-cdr') {
          this.inputFormat = 'cdr';
          setInputFormat = inkscapeArg;
papandreou commented 5 years ago

Hmm, I have to admit that I don't know! inkscape --help on both my Ubuntu box and mac don't mention anything about .cdr support, although the Open dialog in the GUI version does mention that it supports .cdr. I don't have a .cdr file to test with, though, and I can't seem to find any on the net :sweat_smile:

This module is just a very thin wrapper around the inkscape cli tool. Could you try playing around with that and see if you can get it to work?

FlandersBurger commented 5 years ago

@papandreou, it's really weird cause I've successfully converted cdr's in the past with inkscape, no idea what to do, haha.

papandreou commented 5 years ago

Have you tried starting inkscape in the regular gui mode and opening the file? Did it display? Could you export it to another format?

What happens if you run inkscape --without-gui file.cdr --export-png=out.png? Do you get an error, or a corrupt file?