Poppler Reference Manual: poppler

## poppler poppler |

## Functions

PopplerBackend | poppler_get_backend ()
const char * | poppler_get_version ()
gboolean | poppler_date_parse ()
PopplerColor * | poppler_color_new ()
PopplerColor * | poppler_color_copy ()
void | poppler_color_free ()

## Types and Values

#define | POPPLER_ERROR
enum | PopplerError
enum | PopplerOrientation
enum | PopplerBackend
| PopplerColor
enum | PopplerPrintFlags
enum | PopplerFindFlags

## Includes

    #include <poppler.h>

## Description

## Functions

### 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

#### Parameters

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`

#### Parameters

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

#### Parameters

color | a PopplerColor |

## Types and Values

### POPPLER_ERROR

    #define POPPLER_ERROR poppler_error_quark ()

### enum PopplerError

Error codes returned by PopplerDocument

#### Members

POPPLER_ERROR_INVALID | Generic error when a document operation 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

#### Members

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

### enum PopplerBackend

#### Members

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

#### Members

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

### enum PopplerPrintFlags

Printing flags

#### Members

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

Flags using while searching text in a page

#### Members

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