gotenberg-ruby 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d5bca5c31fb41596a72235309e9ac5156d156290a8d8f961b626e49e41a896a
4
- data.tar.gz: 1d2562aaef002bafbafdc1f31da3341de73271b2cb09a95f9eede6f36b76c38d
3
+ metadata.gz: ef6aa667b1051bd3bbf25a2b0e269fe9d38126b3bf6b7124d762daac1295e09b
4
+ data.tar.gz: 68f75974623473b6c328e7a920a09aa85ab72883d48b855d8272c61fd63e5d51
5
5
  SHA512:
6
- metadata.gz: 4fa4fa88a317bc10f35fc9f01bcae87b14501f3fc5aeca9e67a70d3c1e433c863cfdd61fc19af4797a0a6aa16b3438542450eed7ca9a7d685f78e275ec102884
7
- data.tar.gz: 88fe62bc6fbc1e8f2db20cd4a797bfca471c01e45feb6636299e427d35dd8b55cb6900677386dacb6c9c2e8221b4c628431063d7de0621ee8b36d0856036af89
6
+ metadata.gz: 1c0e9c3399c0b0353a0967cecdd1a4a9a302cdc3d28e1ef107c74eb80653c8a8d8c1ca4cf98e43dbe333fc1dd36fc23a2177fa6243b8a044d333ab7399738b04
7
+ data.tar.gz: 465edabe6fc547b787c84ec23d84bef8e06505e24d963050b0103d96f335b7b986024f60289f283a4024da2a2b4049e905ace013b363cd5736f592a5e07da13f
data/README.md CHANGED
@@ -25,6 +25,7 @@ gem "gotenberg-ruby"
25
25
  * [LibreOffice](#libreOffice)
26
26
  * [PDF Engines](#pdf-engines)
27
27
  * [Webhook](#webhook)
28
+ * [Exiftools](#exiftools)
28
29
 
29
30
  ### Run Gotenberg
30
31
 
@@ -640,3 +641,19 @@ document = Gotenberg::Chromium.call(ENV['GOTENBERG_URL']) do |doc|
640
641
  doc.webhook 'https://my.webhook.url', 'https://my.webhook.error.url'
641
642
  end
642
643
  ```
644
+
645
+ ### Exiftools
646
+
647
+ Gem also proxify (expert mode) access to mini_exiftools througth *Gotenberg::Exiftools* class.
648
+ You can change PDF metadata manually:
649
+
650
+ ```ruby
651
+ binary = Gotenberg::Exiftools.modify(pdf_binary, { title: 'Document 1' })
652
+
653
+ # save PDF file
654
+ File.open('filename.pdf', 'wb') do |file|
655
+ file << binary
656
+ end
657
+ ```
658
+
659
+ ⚠️ Class is just wrapper around *MiniExiftool* class, so you need handle exceptions manually/carefully in begin/rescue block.
@@ -43,7 +43,6 @@ module Gotenberg
43
43
  response || raise(exception)
44
44
  end
45
45
 
46
-
47
46
  private
48
47
 
49
48
  def modify_metadata?
@@ -1,3 +1,3 @@
1
1
  module Gotenberg
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.7'
3
3
  end
@@ -5,6 +5,7 @@ module Gotenberg
5
5
  autoload :Chromium, 'gotenberg/chromium'
6
6
  autoload :Libreoffice, 'gotenberg/libreoffice'
7
7
  autoload :PdfEngines, 'gotenberg/pdf_engines'
8
+ autoload :Exiftools, 'gotenberg/exiftools'
8
9
  autoload :Configuration, 'gotenberg/configuration'
9
10
 
10
11
  def self.configuration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotenberg-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanzstez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-28 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday