Visio'i Görüntü biçimlerine dönüştür
Contents
[
Hide
]
Diyagramları Görüntü Dosyası Biçimlerine Aktarın
Bu makalede, Microsoft Visio diagram’in kullanılarak bir görüntüye nasıl aktarılacağı açıklanmaktadır.Aspose.Diagram for .NET API.Diagram diagram dosyalarını okumak için sınıf yapıcısı ve diagram’i desteklenen herhangi bir görüntü formatına dışa aktarmak için Save yöntemi.
diagram’i bir görüntüye dışa aktarmak için:
- Diagram sınıfının bir örneğini oluşturun.
- Diagram sınıfının Save yöntemini çağırın ve dışa aktarmak istediğiniz görüntü formatını ayarlayın. Çıktı görüntü dosyası orijinal dosyaya benziyor.
Microsoft Visio Çizimi Resim Dosyasına Aktar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Belgenin tamamı yerine belirli bir sayfayı resme kaydetmek de mümkündür:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |