pdfGetInfoString

Get the content of a document info field.
char *pdfGetInfoString(PDFHandle pdf, char *field, int *length)
This function retrieves the value of an info field. The returned value is a null-terminated string, and its length is also stored in *length.

Returns NULL if the requested entry doesn't exist in the info dictionary.

The pdfGetInfoString function can be used to get non-standard info entries and also to get the "raw" string values for date-type entries.

The caller is responsible for freeing the string after using it, by calling pdfFreeMemory.

C:
char *s; int length; s = pdfGetInfoString(pdf, "Title", &length); if (s) { printf("title = %s\n", s); } else { printf("no title\n"); } pdfFreeMemory(s);