mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
fix pdf fields extract
This commit is contained in:
1 parent
661e9b69fb
commit
1ba8a9a374
3 files changed
+6
-5
No files matched your search
@@ -32,8 +32,8 @@ module Templates
|
||||
module_function
|
||||
|
||||
# rubocop:disable Metrics
|
||||
def call(pdf, attachment)
|
||||
return [] unless pdf.acro_form
|
||||
def call(pdf, attachment, data)
|
||||
return [] if pdf.acro_form.blank? && data.exclude?('/Form')
|
||||
|
||||
fields, annots_index = build_fields_with_pages(pdf)
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ module Templates
|
||||
if extract_fields && data.size < MAX_FLATTEN_FILE_SIZE
|
||||
pdf = HexaPDF::Document.new(io: StringIO.new(data))
|
||||
|
||||
fields = Templates::FindAcroFields.call(pdf, attachment)
|
||||
fields = Templates::FindAcroFields.call(pdf, attachment, data)
|
||||
end
|
||||
|
||||
generate_pdf_preview_images(attachment, data, pdf, max_pages:)
|
||||
|
||||
Reference in new issue
Block a user