pdfcrowd 5.13.1 → 5.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfcrowd.rb +28 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3b46f24d1656d84d213fa15a588861bc11e4bedc6bd93ac5a87b3c2e50a25ca
4
- data.tar.gz: 154772540e506f59ffbd6c3cc64e25e859482e2845c230a10eb7ac5e4dc47a2c
3
+ metadata.gz: 3d76493fa31359ab0580af96a63f6b642ec81e02b658799439c3f53ca1aa0fdb
4
+ data.tar.gz: 1584157bc827d766cb898dc596ddd6ea1e192709a55bab018fd7f6da88d5b40a
5
5
  SHA512:
6
- metadata.gz: f91d281e04c15b4236d4360cb94ae82da42fc2c7ca9da4db7e9176b1803047e514f6eebacf3b942c0a9e37d515ae8efb698a2453bd1b5c4bb209ab609053f90b
7
- data.tar.gz: 8e2c56c82011c3095e3f44976d28920b43245f3597be42d3eea68c2decb057f68bd2a0b6f45dd7eadc8c41850c17fd53686a496ee8372988d864e1bd41cf724d
6
+ metadata.gz: df9f44f79936df358b4c4ce3a3fa2c2a8d664a0359d04b162cdf92ffcf2ad44aa4aa2c23d49a08c3df6abbfa23a0f751fa79f4f986f01e2a4b18c1bddf21af4f
7
+ data.tar.gz: 3a5a1fad1b7a3b03c503ed6358812d3ae05fac2299b5902953c0e4002c0df10f9a253a5dd1b5d4576c11142846d1e1378534cb0b6c7c92517013d006e4a08efd
data/lib/pdfcrowd.rb CHANGED
@@ -530,7 +530,7 @@ end
530
530
  module Pdfcrowd
531
531
  HOST = ENV["PDFCROWD_HOST"] || 'api.pdfcrowd.com'
532
532
  MULTIPART_BOUNDARY = '----------ThIs_Is_tHe_bOUnDary_$'
533
- CLIENT_VERSION = '5.13.1'
533
+ CLIENT_VERSION = '5.14.0'
534
534
 
535
535
  class ConnectionHelper
536
536
  def initialize(user_name, api_key)
@@ -541,7 +541,7 @@ module Pdfcrowd
541
541
 
542
542
  setProxy(nil, nil, nil, nil)
543
543
  setUseHttp(false)
544
- setUserAgent('pdfcrowd_ruby_client/5.13.1 (https://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/5.14.0 (https://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  @converter_version = '20.10'
@@ -1627,6 +1627,19 @@ module Pdfcrowd
1627
1627
  self
1628
1628
  end
1629
1629
 
1630
+ # Apply custom CSS to the input HTML document. It allows you to modify the visual appearance and layout of your HTML content dynamically. Tip: Using !important in custom CSS provides a way to prioritize and override conflicting styles.
1631
+ #
1632
+ # * +css+ - A string containing valid CSS. The string must not be empty.
1633
+ # * *Returns* - The converter object.
1634
+ def setCustomCss(css)
1635
+ if (!(!css.nil? && !css.empty?))
1636
+ raise Error.new(Pdfcrowd.create_invalid_value_message(css, "setCustomCss", "html-to-pdf", "The string must not be empty.", "set_custom_css"), 470);
1637
+ end
1638
+
1639
+ @fields['custom_css'] = css
1640
+ self
1641
+ end
1642
+
1630
1643
  # Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
1631
1644
  #
1632
1645
  # * +javascript+ - A string containing a JavaScript code. The string must not be empty.
@@ -2799,6 +2812,19 @@ module Pdfcrowd
2799
2812
  self
2800
2813
  end
2801
2814
 
2815
+ # Apply custom CSS to the input HTML document. It allows you to modify the visual appearance and layout of your HTML content dynamically. Tip: Using !important in custom CSS provides a way to prioritize and override conflicting styles.
2816
+ #
2817
+ # * +css+ - A string containing valid CSS. The string must not be empty.
2818
+ # * *Returns* - The converter object.
2819
+ def setCustomCss(css)
2820
+ if (!(!css.nil? && !css.empty?))
2821
+ raise Error.new(Pdfcrowd.create_invalid_value_message(css, "setCustomCss", "html-to-image", "The string must not be empty.", "set_custom_css"), 470);
2822
+ end
2823
+
2824
+ @fields['custom_css'] = css
2825
+ self
2826
+ end
2827
+
2802
2828
  # Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
2803
2829
  #
2804
2830
  # * +javascript+ - A string containing a JavaScript code. The string must not be empty.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfcrowd
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.13.1
4
+ version: 5.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pdfcrowd Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-02 00:00:00.000000000 Z
11
+ date: 2023-07-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: The Pdfcrowd API lets you easily convert between HTML, PDF and various
14
14
  image formats.