logo4 Evolution is progress—                          
progress is creativity.        
vline

Python Programm to Convert old Corel Draw Files

Problem

I have a huge library of CorelDraw files both *.cmx and *.cdr. As I use Ubuntu now, I have no option to preview these files in my explorer. Therefore these files need to be translated into *.svg files. The uniconvert routine produces an error as already reported here. Moreover, it allows only one file being converted at a time and it is boring to type all the filenames of a huge library. Therefore I need a python program that does the job.

Solution

Step 1

Creating a scrip that reads all files from a directory tree recursively.

[Error: Macro 'code' error: code() missing 1 required positional argument: 'ext']

Step 2

The conversion routine has to be created. The uniconverter module has to be included in PYTHONPATH, which is easily accomplished with Eclipse/Pydev environment.

[Error: Macro 'code' error: code() missing 1 required positional argument: 'ext']

Step 3

Still the error is produced wich is probably due to improper installation or configuration. I installed uniconverter through Synaptic Package Manager, and all my uniconverter modules reside in different subdirectories of /usr. Nothing is installed into my home directory. So I copied all uniconverter files into my project changed PYTHONPATH accordingly and edited the file configurator.py in module app.conf as indicated below.

[Error: Macro 'code' error: code() missing 1 required positional argument: 'ext']

After that the programm worked in my eclipse environment. The following warnings can be easily ignored.

No plugin-type information in /home/mato/workspace/py/ConvertCMX/uniconvertor/app/plugins/Filters/__init__.py
No plugin-type information in /home/mato/workspace/py/ConvertCMX/uniconvertor/app/plugins/Filters/__init__.py

Drawback

The produced svg files contain the drawing in the lower left angle of a rectangle. If the drawing exceeds the size of the rectangle the is seems to be clipped off. Probably, I have to invest further research into that.


Tags: Software

 
   

(c) Mato Nagel, Weißwasser 2004-2019, Disclaimer