void pdf_new_page_label (pdf_file_handle pdf_file, int page_index, int base, int count, char style, char *prefix) { struct pdf_obj *label_dict; char style_str [2] = { style, '\0' }; if (! pdf_file->page_label_tree) { pdf_file->page_label_tree = pdf_new_name_tree (pdf_file, 1); } label_dict = pdf_new_obj (PT_DICTIONARY); if (style) pdf_set_dict_entry (label_dict, "S", pdf_new_name (style_str)); if (prefix) pdf_set_dict_entry (label_dict, "P", pdf_new_string (prefix)); if (base > 1) pdf_set_dict_entry (label_dict, "St", pdf_new_integer (base)); pdf_add_number_tree_element (pdf_file->page_label_tree, page_index, label_dict); }
int spc_exec_at_begin_document (void) { int error = 0; int i; ASSERT(!named_objects); named_objects = pdf_new_name_tree(); for (i = 0; known_specials[i].key != NULL; i++) { if (known_specials[i].bodhk_func) { error = known_specials[i].bodhk_func(); } } return error; }
void spc_clear_objects (void) { pdf_delete_name_tree(&named_objects); named_objects = pdf_new_name_tree(); }