mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 06:42:32 -05:00
fix pdf number of pages
This commit is contained in:
1 parent
aef176c0cc
commit
cdb8eb7931
1 file changed
+2
-1
@@ -45,7 +45,8 @@ module Templates
|
||||
ActiveStorage::Attachment.where(name: ATTACHMENT_NAME, record: attachment).destroy_all
|
||||
number_of_pages = HexaPDF::Document.new(io: StringIO.new(data)).pages.size
|
||||
|
||||
(attachment.metadata['pdf'] ||= {})[:number_of_pages] = number_of_pages
|
||||
attachment.metadata['pdf'] ||= {}
|
||||
attachment.metadata['pdf']['number_of_pages'] = number_of_pages
|
||||
|
||||
attachment.save!
|
||||
|
||||
|
||||
Reference in new issue
Block a user