ImageGear for C and C++ on Windows v19.1 - Updated
IG_PDF_doc_get_info
API Reference Guide > PDF Component API Reference > PDF Component Objects Reference > General Objects > HIG_PDF_DOC > IG_PDF_doc_get_info

This function can be used to obtain the values of the following standard document information dictionary keys: "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "Created", and "Modified".

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_PDF_doc_get_info(
       HIG_PDF_DOC hDoc,
       LPCSTR szInfoKey,
       LPSTR szBuffer,
       LONG nSize,
       LPLONG lpnBytes
);

Arguments:

Name Type Description
hDoc HIG_PDF_DOC The document whose Info dictionary key is obtained.
szInfoKey LPCSTR The name of the Info dictionary key whose value is obtained.
szBuffer LPSTR Result buffer containing the value associated with infoKey. If buffer is NULL, the method will just return the number of bytes required.
nSize LONG The maximum number of bytes that can be written into buffer.
lpnBytes LPLONG If szBuffer is NULL, the number of bytes in the specified key's value. If szBuffer is not NULL, returns the number of bytes copied into buffer, excluding the terminating NULL. You must pass at least the length + 1 as the buffer size since the routine adds a '\0' terminator to the data, even though the data is not a C string (it can contain embedded '\0's).

Return Value:

Error count.

Supported Raster Image Formats:

This function does not process image pixels.

Remarks:

See Section 10.2.1 in the PDF Reference for information about Info dictionaries. All values in the Info dictionary should be strings; other data types such as numbers and Booleans should not be used as values in the Info dictionary.

Users may define their own Info dictionary entries. In this case, it is strongly recommended that the key have the developer's prefix assigned by the Adobe Solutions Network.