pdfcrowd 5.13.0 → 5.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pdfcrowd.rb +32 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d76493fa31359ab0580af96a63f6b642ec81e02b658799439c3f53ca1aa0fdb
|
4
|
+
data.tar.gz: 1584157bc827d766cb898dc596ddd6ea1e192709a55bab018fd7f6da88d5b40a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df9f44f79936df358b4c4ce3a3fa2c2a8d664a0359d04b162cdf92ffcf2ad44aa4aa2c23d49a08c3df6abbfa23a0f751fa79f4f986f01e2a4b18c1bddf21af4f
|
7
|
+
data.tar.gz: 3a5a1fad1b7a3b03c503ed6358812d3ae05fac2299b5902953c0e4002c0df10f9a253a5dd1b5d4576c11142846d1e1378534cb0b6c7c92517013d006e4a08efd
|
data/lib/pdfcrowd.rb
CHANGED
@@ -191,12 +191,12 @@ module Pdfcrowd
|
|
191
191
|
end
|
192
192
|
|
193
193
|
def setPageLayout(value)
|
194
|
-
|
194
|
+
assert_pdfcrowd { value > 0 and value <= 3 }
|
195
195
|
@fields['page_layout'] = value
|
196
196
|
end
|
197
197
|
|
198
198
|
def setPageMode(value)
|
199
|
-
|
199
|
+
assert_pdfcrowd { value > 0 and value <= 3 }
|
200
200
|
@fields['page_mode'] = value
|
201
201
|
end
|
202
202
|
|
@@ -242,7 +242,7 @@ module Pdfcrowd
|
|
242
242
|
end
|
243
243
|
|
244
244
|
def setInitialPdfZoomType(value)
|
245
|
-
|
245
|
+
assert_pdfcrowd { value>0 and value<=3 }
|
246
246
|
@fields['initial_pdf_zoom_type'] = value
|
247
247
|
end
|
248
248
|
|
@@ -400,7 +400,7 @@ end
|
|
400
400
|
end
|
401
401
|
|
402
402
|
|
403
|
-
def
|
403
|
+
def assert_pdfcrowd
|
404
404
|
raise "Assertion failed !" unless yield
|
405
405
|
end
|
406
406
|
|
@@ -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.
|
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.
|
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.
|
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-
|
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.
|