CPDF_Dictionary dict; // create a dictionary object std::string key = "Title"; std::string value = dict.GetStringBy(key); // get string value of "Title" key
UString key = "Author"; PDF::PDFDoc doc("input.pdf"); auto info = doc.GetDocumentInfo(); UString value = info->GetInfoDict()->GetString(key);In this example, we create a PDF document object and retrieve the string value of the "Author" key from its information dictionary using the GetString method. Package Library: The package library that contains the CPDF_Dictionary class is not specified in the prompt. It could be any PDF library that provides this class as part of its API. Examples of PDF libraries that provide a CPDF_Dictionary class are Foxit Reader SDK and PDFNet SDK.