XpsDocument
An XPS or OpenXPS package opened as fixed pages in document-sequence order.
The package, sequence, documents and pages follow ECMA-388 §§9, 10. Both Microsoft's 2005 XPS namespace and OpenXPS use this handler. XPS coordinates are 1/96 inch; XpsPage exposes points (1/72 inch), as KitePage requires.
Paths, glyph runs, embedded TrueType/OpenType fonts, image brushes and resource dictionaries render through the same canvas as the other formats. Unsupported or damaged drawing elements are skipped independently, and a missing page stays in its original position as a placeholder. See this module's documentation for the rendering limits; this is not a validator.
val document = XpsDocument.open(bytes)
document.pages.first().renderTo(canvas)Content copied to clipboard