mirror of
https://github.com/docusealco/docuseal
synced 2026-11-10 23:42:32 -05:00
process annotations
This commit is contained in:
1 parent
8770d16d52
commit
d9debcfb0d
1 file changed
+12
@@ -70,6 +70,18 @@ class PdfProcessor < HexaPDF::Content::Processor
|
|||||||
page.contents = process_handler_instance.contents
|
page.contents = process_handler_instance.contents
|
||||||
end
|
end
|
||||||
|
|
||||||
|
page[:Annots].to_a.each do |annot|
|
||||||
|
next unless annot
|
||||||
|
|
||||||
|
text = annot[:Contents].to_s.squish
|
||||||
|
|
||||||
|
next unless text.starts_with?('{{') && text.ends_with?('}}')
|
||||||
|
|
||||||
|
result_handler.call({ text:, rect: annot[:Rect] }, page, acc)
|
||||||
|
|
||||||
|
page[:Annots].delete(annot)
|
||||||
|
end
|
||||||
|
|
||||||
process_handler_instance.result.each do |item|
|
process_handler_instance.result.each do |item|
|
||||||
result_handler.call(item, page, acc)
|
result_handler.call(item, page, acc)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user