Convert CGM to PDF | C#

[ ]

CGM is a file extension for a Computer Graphics Metafile format commonly used in CAD (computer-aided design) and presentation graphics applications. CGM is a vector graphics format that supports three different encoding methods: binary (best for program read speed), character-based (produces the smallest file size and allows for faster data transfers) or cleartext encoding (allows users to read and modify the file with a text editor).

Check next code snippet for converting CGM files to PDF format.

  1. Create an instance of CgmLoadOptions class.
  2. Create an instance of Document class with mention source filename and options.
  3. Save the document with the desired file name.
public static void ConvertCGMtoPDF()
    CgmLoadOptions option = new CgmLoadOptions();
    Document pdfDocument= new Document(_dataDir+"corvette.cgm", option);