#include #include #include void testlabel(Catalog* cat, const char* label) { int idx; if (cat->labelToIndex(new GooString(label), &idx)) printf("label '%s' maps to page index %d\n", label, idx); else printf("label '%s' not found\n", label); } int main(int argc, char** argv) { PDFDoc* pd = new PDFDoc(new GooString(argv[1])); Catalog* cat = pd->getCatalog(); testlabel(cat, "A-2"); testlabel(cat, "B-1"); testlabel(cat, "C-1"); return 0; }