zoukankan      html  css  js  c++  java
  • 如何转换cdr文件

    You will need to copy the type library from corelDRAW: C:Program Files (x86)CorelCorelDRAW Graphics Suite 13ProgramsCorelDraw.tlb into your /bin folder and create a reference to it. Once you have done this you 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:UsersuserDesktop500074.cdr", 1);
    cdr.ActiveDocument.ExportBitmap(
    @"C:UsersuserDesktop ewImage.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:UsersuserDesktop500074.cdr", 1);
    cdr.ActiveDocument.PublishToPDF(@"C:UsersuserDesktopNewImage.pdf");
    cdr.ActiveDocument.Close();
    cdr.Quit();
    }

    引用原文件链接:http://stackoverflow.com/questions/4864765/convert-cdr-corel-draw-using-net

  • 相关阅读:
    zabbix获取主从同步状态的shell
    Linux 线程占用CPU过高定位分析
    LVM
    zabbix添加端口连接数监控
    hadoop未授权访问漏洞
    nginx修改上传文件大小限制(413 Request Entity Too Large)
    官方Tomcat 7.0.81 漏洞整改记录
    python流程控制:while循环
    python流程控制:for循环
    python数据类型—列表(增改删查,统计,取值,排序)
  • 原文地址:https://www.cnblogs.com/valu/p/5862169.html
Copyright © 2011-2022 走看看