PDF Utility functions: Poppler Reference Manual

## PDF Utility functions PDF Utility functions |

## Functions

gboolean | poppler_date_parse ()
char * | poppler_named_dest_from_bytestring ()
guint8 * | poppler_named_dest_to_bytestring ()

## Includes

    #include <poppler.h>

## Description

## Functions

### 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_named_dest_from_bytestring ()

    char *
    poppler_named_dest_from_bytestring (const guint8 *data,
                                        gsize length);

Converts a bytestring into a zero-terminated string suitable to pass to `poppler_document_find_dest()`.

Note that the returned string has no defined encoding and is not suitable for display to the user.

The returned data must be freed using `g_free()`.

#### Parameters

data | the bytestring data. | [array length=length]
length | the bytestring length |

#### Returns

the named dest.

[transfer full]

Since: 0.73

### poppler_named_dest_to_bytestring ()

    guint8 *
    poppler_named_dest_to_bytestring (const char *name,
                                      gsize *length);

Converts a named dest string (e.g. from PopplerDest.named_dest) into a bytestring, inverting the transformation of `poppler_named_dest_from_bytestring()`.

Note that the returned data is not zero terminated and may also contains embedded NUL bytes.

If `name` is not a valid named dest string, returns `NULL`.

The returned data must be freed using `g_free()`.

#### Parameters

name | the named dest string |
length | a location to store the length of the returned bytestring. | [out]

#### Returns

a new bytestring, or `NULL`.

[array length=length][transfer full][nullable]

Since: 0.73