Skip to content

Commit

Permalink
Process both widgets and annotations when rewriting images.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebras committed Jan 8, 2025
1 parent 0144486 commit cc8bbf1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/pdf/pdf-image-rewriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,8 @@ gather_image_info(fz_context *ctx, pdf_document *doc, int page_num, image_info *

for (annot = pdf_first_annot(ctx, page); annot != NULL; annot = pdf_next_annot(ctx, annot))
pdf_filter_annot_contents(ctx, doc, annot, &options);
for (annot = pdf_first_widget(ctx, page); annot != NULL; annot = pdf_next_annot(ctx, annot))
pdf_filter_annot_contents(ctx, doc, annot, &options);
}
fz_always(ctx)
fz_drop_page(ctx, &page->super);
Expand Down Expand Up @@ -919,6 +921,8 @@ rewrite_image_info(fz_context *ctx, pdf_document *doc, int page_num, image_info

for (annot = pdf_first_annot(ctx, page); annot != NULL; annot = pdf_next_annot(ctx, annot))
pdf_filter_annot_contents(ctx, doc, annot, &options);
for (annot = pdf_first_widget(ctx, page); annot != NULL; annot = pdf_next_annot(ctx, annot))
pdf_filter_annot_contents(ctx, doc, annot, &options);
}
fz_always(ctx)
fz_drop_page(ctx, &page->super);
Expand Down

0 comments on commit cc8bbf1

Please sign in to comment.