Analysis of CorelDraw CDR format

Source: Internet
Author: User

The CDR format is the basic format of CorelDraw software, but they do not disclose the file structure. If you want to parse it, you need to crack it by yourself.

Currently, there are two methods. The first method is to directly guess byte values. Currently, there are several Python-based resolutions.Program, Unicovert, inkscape, and so on are all completed by calling the sk1 package, which is difficult to learn and not fully supported,

Another method is to simulate the parsing of CorelDraw's VBA script. Using C # Or C ++, you can call the COM component for parsing. Notes:

    1. Basic Structure CDR file-> page-> layer-> graphics. From top to bottom, all subscripts start from 1.
    2. When calling each interface, note that the variable type must be strictly consistent. For example, if the parameter of item [] is long, int must not be input; otherwise, an error occurs.

You also need to master several basic concepts:

    1. Home page: the home page can be displayed on each page.
    2. Main layer.

To be continued...

References:

Http://forum.oberonplace.com/forumdisplay.php? F = 16

Basics of VC developmentCode, For reference only.

 # include "stdafx. H "# import" vgcoreauto. TLB "RENAME (" getcommandline "," vggetcommandline "), rename (" copyfile "," vgcopyfile "), rename (" findwindow "," vgfindwindow ") no_namespace named_guids # import "CorelDraw. TLB "RENAME (" findwindow "," cdrfindwindow ") named_guidsint _ tmain (INT argc, _ tchar * argv []) {coinitialize (null); CorelDraw :: idrawapplicationptr Papp (L "CorelDraw. application.14 "); CorelDraw: idrawpageptr ptargetpage = PAPP-> activepage; ptargetpage-> activelayer-> createrectangle ); try {ptargetpage-> createlayer ("testlayer");} catch (_ com_error) {} couninitialize (); Return 0 ;}

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.