forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In order to remove metadata from PDF documents we will use the exiftool_vendored gem. The following line: Exiftool.new(attachment_path, "-overwrite_original -all:all=") Overwrites the original file with another file without metadata. So far this is the best solution we have found to perform this metadata deletion. When using Exiftool an exception is thrown, so we added a rescue to handle it. Here is a task created where this problem is discussed: exiftool-rb/exiftool.rb#28. We'll wait to see if this will be fixed in future versions. Translated with www.DeepL.com/Translator (free version)
- Loading branch information
Showing
3 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,5 @@ | |
# | ||
# Add your custom gem dependencies here | ||
|
||
gem "exiftool_vendored", "~> 12.60.0" | ||
gem "ruby-ntlm", "~> 0.0.4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters