Sayfanın Kağıt Genişliğini ve Yüksekliğini Alın
Contents
[
Hide
]
Olası Kullanım Senaryoları
Bazen, sayfanın sayfa düzeninde ayarlandığı için kağıt boyutunun genişliğini ve yüksekliğini bilmeniz gerekir. lütfenPageProps.PageWidthvePageProps.PageHeightBu amaç için özellikler.
Sayfa Genişliğini ve Sayfa Prop Yüksekliğini Alın
Aşağıdaki örnek kod, kullanımını açıklarPageProps.PageWidthvePageProps.PageHeightözellikleri.
Basit kod
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_VisioPages(); | |
// Initialize the new visio diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
// Get Visio page | |
Aspose.Diagram.Page page = diagram.Pages.GetPage("Flow 1"); | |
// Get page's width and height | |
double pagewidth = page.PageSheet.PageProps.PageWidth.Value; | |
double pageheight = page.PageSheet.PageProps.PageHeight.Value; |