mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
import acro form
This commit is contained in:
1 parent
ee1d45d461
commit
c8d3af9841
2 files changed
+10
-2
No files matched your search
@@ -425,6 +425,12 @@ class Pdfium
|
||||
define_singleton_method(:FPDF_RemoveOrphanObjects) { |*| -1 } # rubocop:disable Naming/MethodName
|
||||
end
|
||||
|
||||
begin
|
||||
attach_function :FPDF_ImportAcroForm, %i[FPDF_DOCUMENT FPDF_DOCUMENT], :int
|
||||
rescue FFI::NotFoundError
|
||||
define_singleton_method(:FPDF_ImportAcroForm) { |*| -1 } # rubocop:disable Naming/MethodName
|
||||
end
|
||||
|
||||
FPDF_ERR_SUCCESS = 0
|
||||
FPDF_ERR_UNKNOWN = 1
|
||||
FPDF_ERR_FILE = 2
|
||||
@@ -560,6 +566,8 @@ class Pdfium
|
||||
|
||||
raise PdfiumError, 'Failed to import pages' if result.zero?
|
||||
|
||||
Pdfium.FPDF_ImportAcroForm(@document_ptr, src_doc.document_ptr)
|
||||
|
||||
@page_count = nil
|
||||
|
||||
result
|
||||
|
||||
Reference in new issue
Block a user