The different format handlers (pdf, xps, etc.) interpret pages to a “device”. Devices are the basis for everything that can be done with a page: rendering, text extraction and searching. The device type is determined by the selected construction method.
- class Device#
- __init__(self, object, clip)#
Constructor for either a pixel map or a display list device.
object (Pixmap or DisplayList) – either a Pixmap or a DisplayList.
clip (IRect) – An optional IRect for Pixmap devices to restrict rendering to a certain area of the page. If the complete page is required, specify None. For display list devices, this parameter must be omitted.
- __init__(self, textpage, flags=0)#
Constructor for a text page device.
textpage (TextPage) – TextPage object
flags (int) – control the way how text is parsed into the text page. Currently 3 options can be coded into this parameter, see Text Extraction Flags. To set these options use something like flags=0 | TEXT_PRESERVE_LIGATURES | ….
This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.