fix fields detection

This commit is contained in:
Pete Matsyburka
2024-10-24 17:56:02 +03:00
parent 970e53a5a3
commit c3a933d87d
+3
View File
@@ -25,6 +25,8 @@ module Templates
media_box_start = [media_box[0], media_box[1]]
crop_shift = [crop_box[0] - media_box[0], crop_box[1] - media_box[1]]
next unless child_field[:Rect]
x0, y0, x1, y1 = child_field[:Rect]
x0, y0 = correct_coordinates(x0, y0, crop_shift, media_box_start)
@@ -202,6 +204,7 @@ module Templates
field = annot[:Parent]
field = field[:Parent] while field[:Parent]
annots_index[field.hash] ||= page
fields_index[field.hash] ||= HexaPDF::Type::AcroForm::Field.wrap(pdf, field)
end
end