XpsDocument class

XpsDocument class

Class incapsulating the main entity of XPS document that provides manipulation methods for any XPS element.

Inheritance: XpsDocumentDocument

The XpsDocument type exposes the following members:

Constructors

ConstructorDescription
initCreates empty XPS document with default page size.
initOpens an existing XPS document located at the path.
initOpens an existing document located at the path as XPS document.
initLoads an existing document stored in the stream as XPS document.

Properties

PropertyDescription
utilsGets the object that provides utilities beyond the formal XPS manipulation API.
active_documentGets the active document number.
active_pageGets the active page number within the active document.
pageReturns an XpsPage instance for active page.
document_countReturns the number of documents inside the XPS package.
total_page_countReturns total number of pages in all documents inside XPS document.
page_countReturns the number of pages in the active document.
job_print_ticketReturns/sets document’s job print ticket

Methods

MethodDescription
saveSaves XPS document to XPS file located at the path.
saveSaves XPS document to stream.
saveSaves the document using the Device instance.
save_as_pdfSaves the document in PDF format.
save_as_pdfSaves the document in PDF format.
mergeMerging XPS documents to PDF using the Device instance.
mergeMerging several XPS files to one XPS document.
mergeMerging several XPS files to one XPS document.
merge_to_pdfMerging XPS documents to PDF using the Device instance.
merge_to_pdfMerging XPS documents to PDF using the Device instance.
add_canvasAdds a canvas
add_canvasAdds a new canvas to the active page.
add_pathAdds a path element
add_pathAdds a new path to the active page.
add_glyphsAdds a glyphs element
add_glyphsAdds new glyphs to the active page.
add_glyphsAdds new glyphs to the active page.
add_documentAdds an empty document with default page size.
add_documentAdds an empty document with the first page dimensions
width and height.
insert_documentInserts an empty document with default page size
at index position.
insert_documentInserts an empty document with the first page dimensions
width and height at index position.
add_pageAdds an empty page to the document with default page size.
add_pageAdds an empty page to the document with specified
width and height.
add_pageAdds a page to the document.
insert_pageInserts an empty page to the document with default page size
at index position.
insert_pageInserts an empty page to the document with specified
width and height at index position.
insert_pageInserts a page to the document at index position.
create_glyphsCreates new glyphs.
create_glyphsCreates new glyphs.
insert_glyphsInserts new glyphs to the active page at index position.
insert_glyphsInserts new glyphs to the active page at index position.
create_path_geometryCreates a new path geometry specified with abbreviated form.
create_path_geometryCreates a new path geometry.
create_path_geometry
create_path_figureCreates a new path figure.
create_path_figure
create_solid_color_brushCreates a new solid color brush.
create_solid_color_brushCreates a new solid color brush.
create_gradient_stopCreates a new gradient stop.
create_gradient_stopCreates a new gradient stop.
create_linear_gradient_brush
create_linear_gradient_brushCreates a new linear gradient brush.
create_radial_gradient_brush
create_radial_gradient_brushCreates a new radial gradient brush.
create_image_brushCreates a new image brush.
create_image_brushCreates a new image brush.
create_colorCreates a new color.
create_colorCreates a new color in sRGB color space.
create_colorCreates a new color in sRGB color space.
create_colorCreates a new color in scRGB color space.
create_colorCreates a new color in scRGB color space.
create_colorCreates a new color in ICC based color space.
create_colorCreates a new color in ICC based color space.
create_imageCreates a new image resource out of image file located at the image_path.
create_imageCreates a new image resource out of stream.
create_icc_profileCreates a new ICC profile resource out of ICC profile file located at the
icc_profile_path.
create_icc_profileCreates a new ICC profile resource out of stream.
create_fontCreates a new TrueType font resource.
create_fontCreates a new TrueType font resource out of stream.
select_active_documentSelects an active document for editing.
select_active_pageSelects an active document page for editing.
save_as_imageSaves the document in a bitmap image format.
save_as_psSaves the document in PS format.
get_document_print_ticketReturns the print ticket of the document indexed by document_index.
set_document_print_ticketLinks the print_ticket to the document indexed by document_index.
get_page_print_ticketReturns the print ticket of the page indexed by page_index
in the document indexed by document_index.
set_page_print_ticketLinks the print_ticket to the page indexed by page_index
in the document indexed by document_index.
remove_atRemoves an element at index position from the active page.
remove_document_atRemoves a document at index position.
remove_pageRemoves a page from the document.
remove_page_atRemoves a page from the document at index position.
create_canvasCreates a new canvas.
insert_canvasInserts a new canvas to the active page at index position.
create_pathCreates a new path.
insert_pathInserts a new path to the active page at index position.
create_matrixCreates a new affine transformation matrix.
create_arc_segmentCreates a new elliptical arc segment.
create_poly_line_segmentCreates a new polygonal drawing containing an arbitrary number of individual vertices.
create_poly_bezier_segmentCreates a new set of cubic Bézier curves.
create_poly_quadratic_bezier_segmentCreates a new set of quadratic Bézier curves from the previous point in the path figure through a set
of vertices, using specified control points.
create_visual_brushCreates a new visual brush.
add_outline_entryAdds an outline entry to the document.

See Also