Establezca la orientación y controle la exportación de páginas ocultas Visio al guardar

Cambiar un diseño de página Visio a vertical u horizontal

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.

Este ejemplo funciona de la siguiente manera:

  1. Cargue un Visio diagram existente en el objeto de clase Diagram.
  2. Extraiga una página Visio
  3. Establezca su orientación como Vertical, Horizontal o igual que en la impresora.
  4. Aparta el Visio diagram.

Muestra de Programación de Orientación de Conjunto

El siguiente ejemplo de código muestra cómo configurar la orientación de la página Visio.

Controle la exportación de páginas ocultas Visio al guardar

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.

Oculte una página en Visio Diagram y establezca la opción de exportación

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.

Establecer la opción de exportación para la imagen

El siguiente código muestra cómo configurar las opciones de guardado antes de guardar un diagram en formato de imagen.

Set the Export Option for SVG

The code below shows how to set save options before saving a diagram to SVG format.