fix acroform select field

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2024-11-06 20:30:01 +02:00
1 parent e9034d8da7
commit 0b0f0b497e
2 files changed
+29 -3

No files matched your search

+9
View File
@@ -122,6 +122,15 @@ module Templates
io = StringIO.new
pdf.acro_form.each_field do |field|
next if field.field_type != :Ch ||
field[:Opt].blank? ||
%i[combo_box editable_combo_box].exclude?(field.concrete_field_type) ||
!field.field_value.to_s.match?(FindAcroFields::SELECT_PLACEHOLDER_REGEXP)
field[:V] = ''
end
pdf.acro_form.create_appearances(force: true) if pdf.acro_form[:NeedAppearances]
pdf.acro_form.flatten