تحويل Visio إلى تنسيقات الصور

تصدير المخططات إلى تنسيقات ملفات الصور

يشرح هذا المقال كيفية تصدير Microsoft Visio diagram إلى صورة باستخدامAspose.Diagram for .NET API. استخدمDiagram مُنشئ الفئة لقراءة ملفات diagram وطريقة Save لتصدير diagram إلى أي تنسيق صورة مدعوم.

لتصدير diagram إلى صورة:

  • قم بتكوين نسخة من الفئة Diagram.
  • اتصل بـ Diagram class ‘Save method وقم بتعيين تنسيق الصورة الذي تريد التصدير إليه ، ملف صورة الإخراج يبدو مثل الملف الأصلي.

تصدير Microsoft Visio الرسم إلى ملف الصورة

// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadSaveConvert();
// Call the diagram constructor to load a VSD diagram
Diagram diagram = new Diagram(dataDir + "ExportToImage.vsd");
// Save Image file
diagram.Save(dataDir + "ExportToImage_out.png", SaveFileFormat.PNG);

من الممكن أيضًا حفظ صفحة معينة على الصورة ، بدلاً من حفظ المستند بأكمله:

// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_LoadSaveConvert();
// Load diagram
Diagram diagram = new Diagram(dataDir + "ExportPageToImage.vsd");
// Save diagram as PNG
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
// Save one page only, by page index
options.PageIndex = 0;
// Save resultant Image file
diagram.Save(dataDir + "ExportPageToImage_out.png", options);