summaryrefslogtreecommitdiff
path: root/include/mupdf/pdf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-02-27 11:24:02 +0100
committerTor Andersson <tor.andersson@artifex.com>2018-03-22 14:58:01 +0100
commit21e0da7e2715df87c93433ba9f99be308e6ec814 (patch)
tree4a4c65af79dd7175c6c23ec628504c133bbd069e /include/mupdf/pdf
parentf3b0e4373af7500155e470931e5a50060f5b4612 (diff)
downloadmupdf-21e0da7e2715df87c93433ba9f99be308e6ec814.tar.xz
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.
Diffstat (limited to 'include/mupdf/pdf')
-rw-r--r--include/mupdf/pdf/annot.h3
-rw-r--r--include/mupdf/pdf/document.h2
-rw-r--r--include/mupdf/pdf/resource.h2
3 files changed, 2 insertions, 5 deletions
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);