mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 23:42:32 -05:00
adjust pdf processor
This commit is contained in:
1 parent
345fe674d4
commit
608347b1e6
1 file changed
+2
-2
@@ -51,7 +51,7 @@ class PdfProcessor < HexaPDF::Content::Processor
|
|||||||
handler.call(self, operator, operands)
|
handler.call(self, operator, operands)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.call(data, process_handler, result_handler, acc = {})
|
def self.call(data, process_handler, result_handler, acc = {}, remove_tags: true)
|
||||||
doc = HexaPDF::Document.new(io: StringIO.new(data))
|
doc = HexaPDF::Document.new(io: StringIO.new(data))
|
||||||
|
|
||||||
doc.pages.each do |page|
|
doc.pages.each do |page|
|
||||||
@@ -67,7 +67,7 @@ class PdfProcessor < HexaPDF::Content::Processor
|
|||||||
|
|
||||||
page.process_contents(processor)
|
page.process_contents(processor)
|
||||||
|
|
||||||
page.contents = process_handler_instance.contents
|
page.contents = process_handler_instance.contents if process_handler_instance.result.present? && remove_tags
|
||||||
end
|
end
|
||||||
|
|
||||||
page[:Annots].to_a.each do |annot|
|
page[:Annots].to_a.each do |annot|
|
||||||
|
|||||||
Reference in new issue
Block a user