如何在winform中导入.cdr文件 [英] How to import .cdr file in winform

查看:104
本文介绍了如何在winform中导入.cdr文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨所有



我正在使用c#创建一个Windows应用程序,我需要导入在珊瑚绘图中创建的.cdr文件。



请告诉我如何尽快实现它。



谢谢

解决方案

CoralDraw(cdr)文件格式是专有的而不是公共的 - 因此你不太可能将它读作CoralDraw文件,而只是二进制文件......

http://en.wikipedia.org/wiki/CorelDRAW#CDR_file_format [ ^ ]


如果您希望将应用程序分发到一台机器上没有Corel Draw的许可副本,那么您将不得不编写自己的解析器来将二进制格式转换为应用程序可以使用的位图格式。这不是一项微不足道的任务。另一种方法是使用图像转换器服务,例如这个 [ ^ ]转换图片。



如果机器安装了Corel Draw,您可以使用Corel Draw Type Library和Vector Graphics Core Type Library来操作图像。这可以通过添加引用中的COM选项卡获得。


Stack Overflow ,作为解决方法,您可能会发现如何转换CDR文件:转换cdr(Corel Draw)使用.net [< a href =http://stackoverflow.com/questions/4864765/convert-cdr-corel-draw-using-nettarget =_ blanktitle =New Window> ^ ]。

hi All

I am creating a Windows application using c# in which i need to import .cdr file created in coral draw.

please some tell me how to achieve it as soon as possible.

thanks

解决方案

CoralDraw (cdr) file format is proprietary and not public - so it not likely you can read it as a CoralDraw file, but binary only...
http://en.wikipedia.org/wiki/CorelDRAW#CDR_file_format[^]


If you are looking to distribute the application onto a machine that does not have a licensed copy of Corel Draw in place, then you are going to have to write your own parser to transform the binary format into a bitmap format that your application can use. This is not a trivial task. An alternative would be to use an image converter service such as this[^] to convert the image.

If the machine has Corel Draw installed, you can use the Corel Draw Type Library and Vector Graphics Core Type Library to manipulate the image. This is available through the COM tab in Add References.


At Stack Overflow, you may find, as a workaround, how to convert CDR files: "Convert cdr (Corel Draw) using .net"[^].


这篇关于如何在winform中导入.cdr文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆