How to convert CDR files

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.