CPDF_Dictionary dict; dict.SetName("Type", "Catalog"); dict.SetName("Subtype", "PDF"); dict.SetInteger("Version", 1);
CPDF_Object* pObject = new CPDF_String("Hello, world!"); CPDF_Dictionary dict; dict.SetName("Type", "Catalog"); dict.SetName("Subtype", "PDF"); dict.Set("Greeting", pObject);This code creates a new PDF string object containing the string "Hello, world!", and adds it to an existing PDF dictionary called dict with the key "Greeting". Package Library: Adobe PDF Library.