Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- EvinceDocument.backends_manager_get_document(mime_type)¶
- Parameters:
mime_type (
str) – a mime type hint- Returns:
a new
EvinceDocument.Document- Return type:
- EvinceDocument.backends_manager_get_document_module_name(document)¶
- Parameters:
document (
EvinceDocument.Document) –- Return type:
- EvinceDocument.file_compress(uri, type)¶
- Parameters:
uri (
str) – a file URItype (
EvinceDocument.CompressionType) – the compression type
- Raises:
- Returns:
a newly allocated string URI, or
Noneon error- Return type:
Compresses the file at uri.
If type is
EvinceDocument.CompressionType.NONE, it does nothing and returnsNone.Otherwise, it returns the filename of a temporary file containing the compressed data from the file at uri.
On error it returns
Noneand fills in error.It is the caller’s responsibility to unlink the temp file after use.
- EvinceDocument.file_copy_metadata(from_, to)¶
- Parameters:
- Raises:
- Returns:
Trueif the attributes were copied successfully,Falseotherwise.- Return type:
Performs a
Gio.File.copy_attributes() withGio.FileCopyFlags.ALL_METADATAfrom from to to.New in version 3.4.
- EvinceDocument.file_get_mime_type(uri, fast)¶
- Parameters:
- Raises:
- Returns:
a newly allocated string with the MIME type of the file at uri, or
Noneon error or if the MIME type could not be determined- Return type:
- EvinceDocument.file_get_mime_type_from_fd(fd)¶
- EvinceDocument.file_uncompress(uri, type)¶
- Parameters:
uri (
str) – a file URItype (
EvinceDocument.CompressionType) – the compression type
- Raises:
- Returns:
a newly allocated string URI, or
Noneon error- Return type:
Uncompresses the file at uri.
If type is
EvinceDocument.CompressionType.NONE, it does nothing and returnsNone.Otherwise, it returns the filename of a temporary file containing the decompressed data from the file at uri. On error it returns
Noneand fills in error.It is the caller’s responsibility to unlink the temp file after use.
- EvinceDocument.init()¶
-
Initializes the evince document library, and binds the evince gettext domain.
You must call this before calling any other function in the evince document library.
- EvinceDocument.mkdtemp(tmpl)¶
- Parameters:
tmpl (
str) – a template string; must end in ‘XXXXXX’- Raises:
- Returns:
a newly allocated string with the temp directory name, or
Noneon error with error filled in- Return type:
Creates a temp directory in the evince temp directory.
- EvinceDocument.mkstemp(tmpl, file_name)¶
- Parameters:
- Raises:
- Returns:
a file descriptor to the newly created temp file name, or %-1 on error with error filled in
- Return type:
Creates a temp file in the evince temp directory.
- EvinceDocument.mkstemp_file(tmpl)¶
- Parameters:
tmpl (
str) – a template string; must contain ‘XXXXXX’, but not necessarily as a suffix- Raises:
- Returns:
a newly allocated
Gio.Filefor the newly created temp file name, orNoneon error with error filled in- Return type:
Creates a temp
Gio.Filein the evince temp directory. SeeEvinceDocument.mkstemp() for more information.
- EvinceDocument.rect_cmp(a, b)¶
- Parameters:
a (
EvinceDocument.Rectangle) –b (
EvinceDocument.Rectangle) –
- Return type:
- EvinceDocument.should_use_portal()¶
- Returns:
whether evince should use the portal
- Return type:
Checks whether evince should use the portal.
New in version 3.30.
- EvinceDocument.shutdown()¶
Shuts the evince document library down.
- EvinceDocument.xfer_uri_simple(from_, to)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Performs a
Gio.File.copy() from from to to.
- EvinceDocument.xmp_parse(xmp, size, info)¶
- Parameters:
xmp (
str) –size (
int) –info (
EvinceDocument.DocumentInfo) –
- Return type: