public static void Run() { // ExStart:CGMImageToPDF // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdf_Images(); string inputFile = dataDir + "corvette.cgm"; dataDir = dataDir + "CGMImageToPDF_out_.pdf"; // Save CGM into PDF format PdfProducer.Produce(inputFile, ImportFormat.Cgm, dataDir); // ExEnd:CGMImageToPDF Console.WriteLine("\nCGM file converted to pdf successfully.\nFile saved at " + dataDir); }
public static void Run() { // ExStart:LargeCGMImageToPDF // The path to the documents directory. string dataDir = RunExamples.GetDataDir_AsposePdf_Images(); string inputFile = dataDir + "corvette.cgm"; dataDir = dataDir + "LargeCGMImageToPDF_out_.pdf"; // Create an instance of CgmImportOptions CgmImportOptions options = new CgmImportOptions(); // Specify the dimentions for page size import options.PageSize = new SizeF(1000, 1000); // Save CGM into PDF format PdfProducer.Produce(inputFile, ImportFormat.Cgm, dataDir); // ExEnd:LargeCGMImageToPDF Console.WriteLine("\nLarge CGM file converted to pdf successfully.\nFile saved at " + dataDir); }