Document files¶
-
class
djvu.decode.DocumentFiles¶ Component files of a document.
Use
Document.filesto obtain instances of this class.File indexing is zero-based, i.e.
files[0]stands for the very first file.len(files)might raiseNotAvailablewhen called before receiving aDocInfoMessage.
-
class
djvu.decode.File¶ Component file of a document.
Use
Document.files[N]to obtain instances of this class.-
n¶ Returns: the component file number. File indexing is zero-based, i.e. 0 stands for the very first file.
-
get_info([wait=1])¶ Attempt to obtain information about the component file.
If wait is true, wait until the information is available.
Raises: - NotAvailable – if the information is not available.
- JobFailed – on failure.
-
type¶ Returns: the type of the compound file. The following types are possible:
Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
n_page¶ Returns: the page number, or Nonewhen not applicable.Page indexing is zero-based, i.e. 0 stands for the very first page.
Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
page¶ Returns: the page, or
Nonewhen not applicable.Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
size¶ Returns: the compound file size, or
Nonewhen unknown.Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
id¶ Returns: the compound file identifier, or
None.Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
name¶ Returns: the compound file name, or
None.Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
title¶ Returns: the compound file title, or
None.Raises: - NotAvailable – see
get_info(). - JobFailed – on failure.
- NotAvailable – see
-
dump¶ Returns: a text describing the contents of the file using the same format as the djvudumpcommand.If the information is not available, raise
NotAvailableexception. Then,PageInfoMessagemessages with emptypage_jobmay be emitted.Raises: NotAvailable – see above.
-