### Class

# EvinceDocument Document

#### Description

    abstract class EvinceDocument.Document : GObject.Object
    {
      priv: EvDocumentPrivate*
    }

No description available.

#### Ancestors

- GObject

#### Functions

###### ev_document_doc_mutex_lock

No description available.

###### ev_document_doc_mutex_trylock

No description available.

###### ev_document_doc_mutex_unlock

No description available.

###### ev_document_factory_add_filters

Adds some file filters to `chooser`.

###### ev_document_factory_get_document

Creates a `EvDocument` for the document at `uri`; or, if no backend handling the document’s type is found, or an error occurred on opening the document, returns `NULL` and fills in `error`. If the document is encrypted, it is returned but also `error` is set to `EV_DOCUMENT_ERROR_ENCRYPTED`.

###### ev_document_factory_get_document_for_fd

Synchronously creates a `EvDocument` for the document from `fd` using the backend for loading documents of type `mime_type`; or, if the backend does not support loading from file descriptors, or an error occurred on opening the document, returns `NULL` and fills in `error`. If the document is encrypted, it is returned but also `error` is set to `EV_DOCUMENT_ERROR_ENCRYPTED`.

since: 42.0

###### ev_document_factory_get_document_for_gfile

Synchronously creates a `EvDocument` for the document at `file`; or, if no backend handling the document’s type is found, or an error occurred on opening the document, returns `NULL` and fills in `error`. If the document is encrypted, it is returned but also `error` is set to `EV_DOCUMENT_ERROR_ENCRYPTED`.

since: 3.6

###### ev_document_factory_get_document_for_stream

Synchronously creates a `EvDocument` for the document from `stream`; or, if no backend handling the document’s type is found, or an error occurred on opening the document, returns `NULL` and fills in `error`. If the document is encrypted, it is returned but also `error` is set to `EV_DOCUMENT_ERROR_ENCRYPTED`.

since: 3.6

###### ev_document_factory_get_document_full

Creates a `EvDocument` for the document at `uri`; or, if no backend handling the document’s type is found, or an error occurred on opening the document, returns `NULL` and fills in `error`. If the document is encrypted, it is returned but also `error` is set to `EV_DOCUMENT_ERROR_ENCRYPTED`.

###### ev_document_fc_mutex_lock

No description available.

###### ev_document_fc_mutex_trylock

No description available.

###### ev_document_fc_mutex_unlock

No description available.

###### ev_document_misc_format_date

No description available.

deprecated: 3.38

###### ev_document_misc_format_datetime

Determine the preferred date and time representation for the current locale for `dt`.

since: 3.38

###### ev_document_misc_get_loading_thumbnail

No description available.

###### ev_document_misc_get_page_border_size

No description available.

###### ev_document_misc_get_pointer_position

Get the pointer’s x and y position relative to `widget`.

###### ev_document_misc_get_screen_dpi

No description available.

deprecated: 3.36

###### ev_document_misc_get_thumbnail_frame

No description available.

###### ev_document_misc_get_widget_dpi

Returns sensible guess for DPI of monitor on which given widget has been realized. If HiDPI display, use 192, else 96. Returns 96 as fallback value.

###### ev_document_misc_invert_pixbuf

No description available.

###### ev_document_misc_invert_surface

No description available.

###### ev_document_misc_paint_one_page

No description available.

deprecated: 3.10.

###### ev_document_misc_pixbuf_from_surface

No description available.

###### ev_document_misc_render_loading_thumbnail

No description available.

since: 3.8

###### ev_document_misc_render_loading_thumbnail_surface

No description available.

since: 3.14

###### ev_document_misc_render_thumbnail_surface_with_frame

No description available.

since: 3.14

###### ev_document_misc_render_thumbnail_with_frame

No description available.

since: 3.8

###### ev_document_misc_surface_from_pixbuf

No description available.

###### ev_document_misc_surface_rotate_and_scale

No description available.

#### Instance methods

###### ev_document_check_dimensions

No description available.

###### ev_document_find_page_by_label

No description available.

###### ev_document_get_backend_info

No description available.

###### ev_document_get_info

Returns the `EvDocumentInfo` for the document.

###### ev_document_get_max_label_len

No description available.

###### ev_document_get_max_page_size

No description available.

###### ev_document_get_min_page_size

No description available.

###### ev_document_get_modified

No description available.

since: 3.28

###### ev_document_get_n_pages

No description available.

###### ev_document_get_page

No description available.

###### ev_document_get_page_label

No description available.

###### ev_document_get_page_size

No description available.

###### ev_document_get_size

No description available.

###### ev_document_get_thumbnail

No description available.

###### ev_document_get_thumbnail_surface

No description available.

since: 3.14

###### ev_document_get_title

No description available.

###### ev_document_get_uri

No description available.

###### ev_document_has_synctex

No description available.

###### ev_document_has_text_page_labels

No description available.

###### ev_document_is_page_size_uniform

No description available.

###### ev_document_load

Loads `document` from `uri`.

###### ev_document_load_fd

Synchronously loads the document from `fd`, which must refer to a regular file.

since: 42.0

###### ev_document_load_full

Loads `document` from `uri`.

###### ev_document_load_gfile

Synchronously loads the document from `file`. See `ev_document_load()` for more information.

since: 3.6

###### ev_document_load_stream

Synchronously loads the document from `stream`. See `ev_document_load()` for more information.

since: 3.6

###### ev_document_render

No description available.

###### ev_document_save

Saves `document` to `uri`.

###### ev_document_set_modified

Set the `document` modification state as `modified`.

since: 3.28

###### ev_document_synctex_backward_search

Peforms a Synctex backward search to obtain the TeX input file, line and (possibly) column corresponding to the position (`x`,`y`) (in 72dpi coordinates) in the `page` of `document`.

###### ev_document_synctex_forward_search

Peforms a Synctex forward search to obtain the area in the document corresponding to the position (line and column in `source_link`) in the source Tex file.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### EvinceDocument.Document:modified

No description available.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct EvinceDocumentDocumentClass {
      GObjectClass base_class;
      gboolean (* load) (
        EvDocument* document,
        const char* uri,
        GError** error
      );
      gboolean (* save) (
        EvDocument* document,
        const char* uri,
        GError** error
      );
      gint (* get_n_pages) (
        EvDocument* document
      );
      EvPage* (* get_page) (
        EvDocument* document,
        gint index
      );
      void (* get_page_size) (
        EvDocument* document,
        EvPage* page_index,
        double* width,
        double* height
      );
      gchar* (* get_page_label) (
        EvDocument* document,
        EvPage* page
      );
      cairo_surface_t* (* render) (
        EvDocument* document,
        EvRenderContext* rc
      );
      GdkPixbuf* (* get_thumbnail) (
        EvDocument* document,
        EvRenderContext* rc
      );
      EvDocumentInfo* (* get_info) (
        EvDocument* document
      );
      gboolean (* get_backend_info) (
        EvDocument* document,
        EvDocumentBackendInfo* info
      );
      gboolean (* support_synctex) (
        EvDocument* document
      );
      gboolean (* load_stream) (
        EvDocument* document,
        GInputStream* stream,
        EvDocumentLoadFlags flags,
        GCancellable* cancellable,
        GError** error
      );
      gboolean (* load_gfile) (
        EvDocument* document,
        GFile* file,
        EvDocumentLoadFlags flags,
        GCancellable* cancellable,
        GError** error
      );
      cairo_surface_t* (* get_thumbnail_surface) (
        EvDocument* document,
        EvRenderContext* rc
      );
      gboolean (* load_fd) (
        EvDocument* document,
        int fd,
        EvDocumentLoadFlags flags,
        GCancellable* cancellable,
        GError** error
      );

    }

No description available.

###### Class members

`base_class: GObjectClass`

  No description available.

`load: gboolean (* load) ( EvDocument* document, const char* uri, GError** error )`

  No description available.

`save: gboolean (* save) ( EvDocument* document, const char* uri, GError** error )`

  No description available.

`get_n_pages: gint (* get_n_pages) ( EvDocument* document )`

  No description available.

`get_page: EvPage* (* get_page) ( EvDocument* document, gint index )`

  No description available.

`get_page_size: void (* get_page_size) ( EvDocument* document, EvPage* page_index, double* width, double* height )`

  No description available.

`get_page_label: gchar* (* get_page_label) ( EvDocument* document, EvPage* page )`

  No description available.

`render: cairo_surface_t* (* render) ( EvDocument* document, EvRenderContext* rc )`

  No description available.

`get_thumbnail: GdkPixbuf* (* get_thumbnail) ( EvDocument* document, EvRenderContext* rc )`

  No description available.

`get_info: EvDocumentInfo* (* get_info) ( EvDocument* document )`

  No description available.

`get_backend_info: gboolean (* get_backend_info) ( EvDocument* document, EvDocumentBackendInfo* info )`

  No description available.

`support_synctex: gboolean (* support_synctex) ( EvDocument* document )`

  No description available.

`load_stream: gboolean (* load_stream) ( EvDocument* document, GInputStream* stream, EvDocumentLoadFlags flags, GCancellable* cancellable, GError** error )`

  No description available.

`load_gfile: gboolean (* load_gfile) ( EvDocument* document, GFile* file, EvDocumentLoadFlags flags, GCancellable* cancellable, GError** error )`

  No description available.

`get_thumbnail_surface: cairo_surface_t* (* get_thumbnail_surface) ( EvDocument* document, EvRenderContext* rc )`

  No description available.

`load_fd: gboolean (* load_fd) ( EvDocument* document, int fd, EvDocumentLoadFlags flags, GCancellable* cancellable, GError** error )`

  No description available.

#### Virtual methods

###### EvinceDocument.DocumentClass.get_backend_info

No description available.

###### EvinceDocument.DocumentClass.get_info

Returns the `EvDocumentInfo` for the document.

###### EvinceDocument.DocumentClass.get_n_pages

No description available.

###### EvinceDocument.DocumentClass.get_page

No description available.

###### EvinceDocument.DocumentClass.get_page_label

No description available.

###### EvinceDocument.DocumentClass.get_page_size

No description available.

###### EvinceDocument.DocumentClass.get_thumbnail

No description available.

###### EvinceDocument.DocumentClass.get_thumbnail_surface

No description available.

since: 3.14

###### EvinceDocument.DocumentClass.load

Loads `document` from `uri`.

###### EvinceDocument.DocumentClass.load_fd

Synchronously loads the document from `fd`, which must refer to a regular file.

since: 42.0

###### EvinceDocument.DocumentClass.load_gfile

Synchronously loads the document from `file`. See `ev_document_load()` for more information.

since: 3.6

###### EvinceDocument.DocumentClass.load_stream

Synchronously loads the document from `stream`. See `ev_document_load()` for more information.

since: 3.6

###### EvinceDocument.DocumentClass.render

No description available.

###### EvinceDocument.DocumentClass.save

Saves `document` to `uri`.

###### EvinceDocument.DocumentClass.support_synctex

No description available.