When resynthesising an annotation, we consider the field being
dirty as enough reason to resynthesise it. As such, whenever a
field is marked as dirty, we should trigger a resynthesis, so
that fields don't change later on when resynthesise are triggered
for other reasons.
calc2.pdf fails to update properly (type 123 x 45 = for example)
without this fix, so clearly we are not currently triggering a
resythesis when we should be.
Credit to Sebastian for spotting this.
static void pdf_field_mark_dirty(fz_context *ctx, pdf_obj *field)
{
+ pdf_document *doc = pdf_get_bound_document(ctx, field);
pdf_obj *kids = pdf_dict_get(ctx, field, PDF_NAME(Kids));
if (kids)
{
pdf_field_mark_dirty(ctx, pdf_array_get(ctx, kids, i));
}
pdf_dirty_obj(ctx, field);
+ if (doc)
+ doc->resynth_required = 1;
}
static void update_field_value(fz_context *ctx, pdf_document *doc, pdf_obj *obj, const char *text)