You'll need to copy the type library from Coreldraw:c:\program Files (x86) \corel\coreldraw Graphics Suite 13\programs\c Oreldraw.tlb into Your/bin folder and create a reference to it. Once you are should be able to export. CDR files to many different formats. The sample code below converts. cdr to. png.
Using System;
Using System.Collections.Generic;
Using System.Web;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using CorelDRAW;
Namespace WebApplication1
{
public partial class _default:system.web.ui.page
{
protected void Button1_Click (object sender, EventArgs e)
{
Coreldraw.application CDR =
New application ();
Cdr. OpenDocument (@ "C:\Users\user\Desktop\500074.cdr", 1);
Cdr. Activedocument.exportbitmap (
@ "C:\Users\user\Desktop\newImage.png",
CorelDRAW.cdrFilter.cdrPNG,
CorelDRAW.cdrExportRange.cdrCurrentPage,
CorelDRAW.cdrImageType.cdrRGBColorImage,
0, 0, 72, 72,
CorelDRAW.cdrAntiAliasingType.cdrNoAntiAliasing,
False
True
True
False
CorelDRAW.cdrCompressionType.cdrCompressionNone,
NULL). Finish ();
Cdr. Activedocument.close ();
Cdr. Quit ();
}
protected void Page_Load (object sender, EventArgs e)
{
}
}
}
This code would convert the. cdr to. pdf:
protected void button2_click (object sender, EventArgs e)
{
Coreldraw.application CDR =
New application ();
Cdr. OpenDocument (@ "C:\Users\user\Desktop\500074.cdr", 1);
Cdr. Activedocument.publishtopdf (@ "C:\Users\user\Desktop\NewImage.pdf");
Cdr. Activedocument.close ();
Cdr. Quit ();
}
Reference original file Link: http://stackoverflow.com/questions/4864765/convert-cdr-corel-draw-using-net
How to convert CDR files