diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-04-12 19:42:19 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-04-26 10:54:48 +0100 |
commit | f4a365df3f7709192ec6052832e857d2832ae47f (patch) | |
tree | 407bbbb259c173ed9d89c0064610b442bfc84e12 /source/pdf/pdf-write.c | |
parent | 4584bb1fbd3208e516a6f17b36c3b861903529f7 (diff) | |
download | mupdf-f4a365df3f7709192ec6052832e857d2832ae47f.tar.xz |
Update mutool clean sanitize to clean annotations too.
Diffstat (limited to 'source/pdf/pdf-write.c')
-rw-r--r-- | source/pdf/pdf-write.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index 388a5820..8e686218 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -2656,8 +2656,15 @@ static void sanitize(fz_context *ctx, pdf_document *doc, int ascii) for (i = 0; i < n; i++) { + pdf_annot *annot; pdf_page *page = pdf_load_page(ctx, doc, i); pdf_clean_page_contents(ctx, doc, page, NULL, NULL, NULL, ascii); + + for (annot = pdf_first_annot(ctx, page); annot != NULL; annot = pdf_next_annot(ctx, annot)) + { + pdf_clean_annot_contents(ctx, doc, annot, NULL, NULL, NULL, ascii); + } + fz_drop_page(ctx, &page->super); } } |