设置 FitToSheetAcross
Contents
[
Hide
]
有时,需要为页面配置页面设置以控制打印。这些页面设置设置提供了各种选项。
设置 FitToSheetAcross
Aspose.Diagram 完全支持页面设置选项。本文介绍了如何使用 Aspose.Diagram 设置页面选项,并显示了用于设置的代码示例:
Aspose.Diagram提供了一个类,页 ,代表一个 Microsoft Visio 文件。这Diagram类包含一个页数允许访问 Visio 文件中每个页面的集合。一个页面由页班级。
这页表类提供了打印道具用于设置页面的页面设置选项的属性。事实上,这打印道具属性是页表用于为打印页面设置不同页面布局选项的类。这打印道具类提供用于设置页面设置选项的各种属性。下面讨论其中一些特性。
FitToSheetAcross
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_Print(); | |
// Load source Visio diagram | |
Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx"); | |
PrintProps printProps = diagram.Pages[0].PageSheet.PrintProps; | |
printProps.OnPage.Value = BOOL.True; | |
//Set Fit to sheet(s) across | |
printProps.PagesX.Value = 1; | |
//Set By sheet(s) down | |
printProps.PagesY.Value = 1; |