From 21e0da7e2715df87c93433ba9f99be308e6ec814 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 27 Feb 2018 11:24:02 +0100 Subject: Load most annotations, even if they are missing appearances. Filter out Link and Popup annotations. Links are not comments, popup annotations are auxiliary information for other annotations, so neither of these types should be present in our list of annotations, but all other annotations should be there, whether they have appearance streams or not. Ensure has_new_ap is zero when first loaded, and changed if either the active AP object is changed or the current AP content stream is updated. --- include/mupdf/pdf/annot.h | 3 ++- include/mupdf/pdf/document.h | 2 -- include/mupdf/pdf/resource.h | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) (limited to 'include/mupdf/pdf') diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index 58c11a33..94a8f33f 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -258,8 +258,9 @@ void pdf_set_free_text_details(fz_context *ctx, pdf_annot *annot, fz_point *pos, /* pdf_new_annot: Internal function for creating a new pdf annotation. */ -pdf_annot *pdf_new_annot(fz_context *ctx, pdf_page *page); +pdf_annot *pdf_new_annot(fz_context *ctx, pdf_page *page, pdf_obj *obj); +void pdf_update_appearance(fz_context *ctx, pdf_annot *annot); void pdf_dirty_annot(fz_context *ctx, pdf_annot *annot); #endif diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index 5b5963ba..5ab0fa2c 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -695,8 +695,6 @@ struct pdf_document_s int recalculating; int dirty; - void (*update_appearance)(fz_context *ctx, pdf_document *doc, pdf_annot *annot); - pdf_doc_event_cb *event_cb; void *event_cb_data; diff --git a/include/mupdf/pdf/resource.h b/include/mupdf/pdf/resource.h index 05de95b2..c98ba9df 100644 --- a/include/mupdf/pdf/resource.h +++ b/include/mupdf/pdf/resource.h @@ -82,8 +82,6 @@ void pdf_drop_pattern(fz_context *ctx, pdf_pattern *pat); pdf_obj *pdf_new_xobject(fz_context *ctx, pdf_document *doc, const fz_rect *bbox, const fz_matrix *mat); void pdf_update_xobject_contents(fz_context *ctx, pdf_document *doc, pdf_obj *form, fz_buffer *buffer); -void pdf_update_appearance(fz_context *ctx, pdf_document *doc, pdf_annot *annot); - pdf_obj *pdf_xobject_resources(fz_context *ctx, pdf_obj *xobj); fz_rect *pdf_xobject_bbox(fz_context *ctx, pdf_obj *xobj, fz_rect *bbox); fz_matrix *pdf_xobject_matrix(fz_context *ctx, pdf_obj *xobj, fz_matrix *matrix); -- cgit v1.2.3