## poppler poppler |

## Synopsis

    #include <poppler.h>

    #define             POPPLER_ERROR
    enum                PopplerError;
    enum                PopplerOrientation;
    enum                PopplerBackend;
                        PopplerColor;
    enum                PopplerPrintFlags;
    enum                PopplerFindFlags;
    PopplerBackend      poppler_get_backend                 (void);
    const char *        poppler_get_version                 (void);
    gboolean            poppler_date_parse                  (const gchar *date,
                                                             time_t *timet);
    PopplerColor *      poppler_color_new                   (void);
    PopplerColor *      poppler_color_copy                  (PopplerColor *color);
    void                poppler_color_free                  (PopplerColor *color);

## Description

## Details

### POPPLER_ERROR

    #define POPPLER_ERROR poppler_error_quark ()

### enum PopplerError

    typedef enum {
      POPPLER_ERROR_INVALID,
      POPPLER_ERROR_ENCRYPTED,
      POPPLER_ERROR_OPEN_FILE,
      POPPLER_ERROR_BAD_CATALOG,
      POPPLER_ERROR_DAMAGED
    } PopplerError;

Error codes returned by PopplerDocument

`POPPLER_ERROR_INVALID` | Generic error when a document opration fails
`POPPLER_ERROR_ENCRYPTED` | Document is encrypted
`POPPLER_ERROR_OPEN_FILE` | File could not be opened for writing when saving document
`POPPLER_ERROR_BAD_CATALOG` | Failed to read the document catalog
`POPPLER_ERROR_DAMAGED` | Document is damaged

### enum PopplerOrientation

    typedef enum {
      POPPLER_ORIENTATION_PORTRAIT,
      POPPLER_ORIENTATION_LANDSCAPE,
      POPPLER_ORIENTATION_UPSIDEDOWN,
      POPPLER_ORIENTATION_SEASCAPE
    } PopplerOrientation;

`POPPLER_ORIENTATION_PORTRAIT` |
`POPPLER_ORIENTATION_LANDSCAPE` |
`POPPLER_ORIENTATION_UPSIDEDOWN` |
`POPPLER_ORIENTATION_SEASCAPE` |

### enum PopplerBackend

    typedef enum {
      POPPLER_BACKEND_UNKNOWN,
      POPPLER_BACKEND_SPLASH,
      POPPLER_BACKEND_CAIRO
    } PopplerBackend;

`POPPLER_BACKEND_UNKNOWN` |
`POPPLER_BACKEND_SPLASH` |
`POPPLER_BACKEND_CAIRO` |

### PopplerColor

    typedef struct {
      guint16 red;
      guint16 green;
      guint16 blue;
    } PopplerColor;

A PopplerColor describes a RGB color. Color components are values between 0 and 65535

guint16 `red`; | the red componment of color
guint16 `green`; | the green component of color
guint16 `blue`; | the blue component of color

### enum PopplerPrintFlags

    typedef enum {
      POPPLER_PRINT_DOCUMENT          = 0,
      POPPLER_PRINT_MARKUP_ANNOTS     = 1 << 0,
      POPPLER_PRINT_STAMP_ANNOTS_ONLY = 1 << 1,
      POPPLER_PRINT_ALL               = POPPLER_PRINT_MARKUP_ANNOTS
    } PopplerPrintFlags;

Printing flags

`POPPLER_PRINT_DOCUMENT` | print main document contents
`POPPLER_PRINT_MARKUP_ANNOTS` | print document and markup annotations
`POPPLER_PRINT_STAMP_ANNOTS_ONLY` | print document and only stamp annotations
`POPPLER_PRINT_ALL` | print main document contents and all markup annotations

Since 0.16

### enum PopplerFindFlags

    typedef enum {
      POPPLER_FIND_DEFAULT          = 0,
      POPPLER_FIND_CASE_SENSITIVE   = 1 << 0,
      POPPLER_FIND_BACKWARDS        = 1 << 1,
      POPPLER_FIND_WHOLE_WORDS_ONLY = 1 << 2
    } PopplerFindFlags;

Flags using while searching text in a page

`POPPLER_FIND_DEFAULT` |
`POPPLER_FIND_CASE_SENSITIVE` | do case sensitive search
`POPPLER_FIND_BACKWARDS` | search backwards
`POPPLER_FIND_WHOLE_WORDS_ONLY` | search only whole words

Since 0.22

### poppler_get_backend ()

    PopplerBackend      poppler_get_backend                 (void);

Returns the backend compiled into the poppler library.

Returns : | The backend used by poppler

### poppler_get_version ()

    const char *        poppler_get_version                 (void);

Returns the version of poppler in use. This result is not to be freed.

Returns : | the version of poppler.

### poppler_date_parse ()

    gboolean            poppler_date_parse                  (const gchar *date,
                                                             time_t *timet);

Parses a PDF format date string and converts it to a time_t. Returns FALSE if the parsing fails or the input string is not a valid PDF format date string

`date` : | string to parse
`timet` : | an uninitialized time_t
Returns : | TRUE, if `timet` was set

Since 0.12

### poppler_color_new ()

    PopplerColor *      poppler_color_new                   (void);

Creates a new PopplerColor

Returns : | a new PopplerColor, use `poppler_color_free()` to free it

### poppler_color_copy ()

    PopplerColor *      poppler_color_copy                  (PopplerColor *color);

Creates a copy of `color`

`color` : | a PopplerColor to copy
Returns : | a new allocated copy of `color`

### poppler_color_free ()

    void                poppler_color_free                  (PopplerColor *color);

Frees the given PopplerColor

`color` : | a PopplerColor