XpsDocument

Vue de l’ensemble

‘XpsDocument’ est une classe dans Aspose.Page FOSS pour Python.

Il représente un document XPS chargé ou édité.

Cette classe fournit 12 méthodes pour travailler avec des objets XpsDocument dans les programmes Python. Les méthodologies disponibles comprennent: add_page, create , from_bytes ، fra_file ; get_print_tickets; insert_ Page : ‘remove_ page . , 'rémove _print _ ticket ! , ‘save ? , ’set_ print_ ticket‘ , ‚to_image et ’to _pdf. Tous les membres publics sont accessibles à toute application Pythone après l'installation de l’Aspose.Page FOSS pour le package PyThone. Propriétés : builder`

Propriétés

NameTypeAccessDescription
packageXpsPackageRead/WriteGets or sets the package.
builderXpsDocumentBuilderRead/WriteGets or sets the builder.

méthodes

SignatureDescription
`create(title: strNone)“XpsDocument”`
from_bytes(data: bytes)"XpsDocument"Create an XPS document from bytes.
from_file(path: str)"XpsDocument"Create an XPS document from a file path.
add_page(width: float, height: float)XpsFixedPageAppend a new fixed page and return it.
insert_page(index: int, page: XpsFixedPage)Insert a fixed page at the given index.
remove_page(index: int)Remove a fixed page at the given index.
`save(path: strNone)bytes`
get_print_tickets()list["PrintTicket"]Return all print tickets in the document.
`set_print_ticket(scope: str, xml: str, page_index: intNone)`
`remove_print_ticket(scope: str, page_index: intNone)`
`to_pdf(options: “PdfSaveOptionsNone”)bytes`
to_image(options: "ImageSaveOptions")bytesConvert the document to raster image bytes.

Voir aussi

  • Aspose.Page pour Python — API d’entreprise référence
 Français