设置方向并控制隐藏 Visio 保存页面的导出
将 Visio 页面布局更改为纵向或横向
Aspose.Diagram for Python via Java API allows developers to set the orientation of the Visio drawing page programmatically. This help topic explains how to accomplish this task.
Aspose.Diagram for Python via Java API has the Page
class that represents a Visio drawing page. The PageSheet property exposed by the Page class also exposes the print properties. The PrintPageOrientation
field of the print properties allows to rotate the page. It offers three options as Portrait, Landscape and same as on the printer. The PrintPageOrientation field can be set programmatically using Aspose.Diagram for Python via Java API.
这个例子的工作原理如下:
- 将现有的 Visio diagram 加载到 Diagram 类对象中。
- 提取一个Visio页面
- 将其方向设置为纵向、横向或与打印机相同。
- 保存 Visio diagram。
设置方向编程示例
下面的代码示例显示了如何设置 Visio 页面的方向。
控制导出隐藏的 Visio 页面保存
Aspose.Diagram for Python via Java API allows developers to include or exclude hidden Visio pages on saving diagram to PDF, HTML, Image (PNG, JPEG, GIF), SVG, and XPS files. Even they may hide Visio pages using Aspose.Diagram for Python via Java API because its option is already available through the cell UIVisibility in the page ShapeSheet.
在 Visio Diagram 隐藏一个页面并设置导出选项
Aspose.Diagram for Python via Java API has the Page
class that represents a Visio drawing page. The PageSheet property exposed by the Page class also exposes the page properties. The UIVisibility
field of the page properties allows to hide the page. Developers can then use exportHiddenPage
property which is added in the SVGSaveOptions
, XPSSaveOptions
, ImageSaveOptions
, HTMLSaveOptions
and PdfSaveOptions
classes.
Set the Export Option for PDF
The code below shows how to set save options before saving a diagram to PDF format.
Set the Export Option for HTML
The code below shows how to set save options before saving a diagram to HTML format.
设置图像的导出选项
下面的代码显示了如何在将 diagram 保存为图像格式之前设置保存选项。
Set the Export Option for SVG
The code below shows how to set save options before saving a diagram to SVG format.