Manipulating CorelDRAW Files

Contents
[ ]

Load a CDR File

Aspose.Imaging now supports the CDR files. A CDR file is a drawing created with CorelDRAW, a vector illustration and page layout program. In the example below, an existing CDR file is loaded by passing the file path to the Image class static Load method.

The following code snippet shows you how to load a CDR file.

// The path to the documents directory.
String baseFolder = Utils.getSharedDataDir(SupportOfCDR.class) + "CDR/";
String inputFileName = baseFolder + "test.cdr";
long expectedFileFormat = FileFormat.Cdr;
long realFileFormat = Image.getFileFormat(inputFileName);
Assert.assertEquals(expectedFileFormat, realFileFormat, "File format is incorrect!");