pdfcrowd 5.4.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pdfcrowd.rb +50 -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: e1f429f623032663bba80b3721543135acd26631fd14d1e3e0f4ca4cf68d442b
|
4
|
+
data.tar.gz: d6aab3488d4279ae482e754bc65982d4351f886732b9cb9edbf21640833f4d86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d273329f0ad0395d06cfa7aced180ada64d590f7a3a2c397489feedfe812b77dc82a22954f9ce4cca9da4d251554dfd9606d2508bb987ad50a5ea52df974a8db
|
7
|
+
data.tar.gz: 83f30ac65c6c90ccdf9f87b0bf4b3699d02f141f343a69aecf30d1b306457e3d78892daa9e7642630fdeb4d004501cc385da91d859a7ade0444d069fe9456051
|
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.
|
533
|
+
CLIENT_VERSION = '5.5.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.5.0 (https://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
@converter_version = '20.10'
|
@@ -1183,7 +1183,7 @@ module Pdfcrowd
|
|
1183
1183
|
self
|
1184
1184
|
end
|
1185
1185
|
|
1186
|
-
# Load an HTML code from the specified URL and use it as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of
|
1186
|
+
# Load an HTML code from the specified URL and use it as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of the converted document pdfcrowd-source-title - the title of the converted document The following attributes can be used: data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values: arabic - Arabic numerals, they are used by default roman - Roman numerals eastern-arabic - Eastern Arabic numerals bengali - Bengali numerals devanagari - Devanagari numerals thai - Thai numerals east-asia - Chinese, Vietnamese, Japanese and Korean numerals chinese-formal - Chinese formal numerals Please contact us if you need another type of numerals. Example: <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span> data-pdfcrowd-placement - specifies where to place the source URL. Allowed values: The URL is inserted to the content Example: <span class='pdfcrowd-source-url'></span> will produce <span>http://example.com</span> href - the URL is set to the href attribute Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a> will produce <a href='http://example.com'>Link to source</a> href-and-content - the URL is set to the href attribute and to the content Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a> will produce <a href='http://example.com'>http://example.com</a>
|
1187
1187
|
#
|
1188
1188
|
# * +url+ - The supported protocols are http:// and https://.
|
1189
1189
|
# * *Returns* - The converter object.
|
@@ -1196,7 +1196,7 @@ module Pdfcrowd
|
|
1196
1196
|
self
|
1197
1197
|
end
|
1198
1198
|
|
1199
|
-
# Use the specified HTML code as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of
|
1199
|
+
# Use the specified HTML code as the page header. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of the converted document pdfcrowd-source-title - the title of the converted document The following attributes can be used: data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values: arabic - Arabic numerals, they are used by default roman - Roman numerals eastern-arabic - Eastern Arabic numerals bengali - Bengali numerals devanagari - Devanagari numerals thai - Thai numerals east-asia - Chinese, Vietnamese, Japanese and Korean numerals chinese-formal - Chinese formal numerals Please contact us if you need another type of numerals. Example: <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span> data-pdfcrowd-placement - specifies where to place the source URL. Allowed values: The URL is inserted to the content Example: <span class='pdfcrowd-source-url'></span> will produce <span>http://example.com</span> href - the URL is set to the href attribute Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a> will produce <a href='http://example.com'>Link to source</a> href-and-content - the URL is set to the href attribute and to the content Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a> will produce <a href='http://example.com'>http://example.com</a>
|
1200
1200
|
#
|
1201
1201
|
# * +html+ - The string must not be empty.
|
1202
1202
|
# * *Returns* - The converter object.
|
@@ -1231,7 +1231,7 @@ module Pdfcrowd
|
|
1231
1231
|
self
|
1232
1232
|
end
|
1233
1233
|
|
1234
|
-
# Load an HTML code from the specified URL and use it as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of
|
1234
|
+
# Load an HTML code from the specified URL and use it as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of the converted document pdfcrowd-source-title - the title of the converted document The following attributes can be used: data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values: arabic - Arabic numerals, they are used by default roman - Roman numerals eastern-arabic - Eastern Arabic numerals bengali - Bengali numerals devanagari - Devanagari numerals thai - Thai numerals east-asia - Chinese, Vietnamese, Japanese and Korean numerals chinese-formal - Chinese formal numerals Please contact us if you need another type of numerals. Example: <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span> data-pdfcrowd-placement - specifies where to place the source URL. Allowed values: The URL is inserted to the content Example: <span class='pdfcrowd-source-url'></span> will produce <span>http://example.com</span> href - the URL is set to the href attribute Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a> will produce <a href='http://example.com'>Link to source</a> href-and-content - the URL is set to the href attribute and to the content Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a> will produce <a href='http://example.com'>http://example.com</a>
|
1235
1235
|
#
|
1236
1236
|
# * +url+ - The supported protocols are http:// and https://.
|
1237
1237
|
# * *Returns* - The converter object.
|
@@ -1244,7 +1244,7 @@ module Pdfcrowd
|
|
1244
1244
|
self
|
1245
1245
|
end
|
1246
1246
|
|
1247
|
-
# Use the specified HTML as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of
|
1247
|
+
# Use the specified HTML as the page footer. The following classes can be used in the HTML. The content of the respective elements will be expanded as follows: pdfcrowd-page-count - the total page count of printed pages pdfcrowd-page-number - the current page number pdfcrowd-source-url - the source URL of the converted document pdfcrowd-source-title - the title of the converted document The following attributes can be used: data-pdfcrowd-number-format - specifies the type of the used numerals. Allowed values: arabic - Arabic numerals, they are used by default roman - Roman numerals eastern-arabic - Eastern Arabic numerals bengali - Bengali numerals devanagari - Devanagari numerals thai - Thai numerals east-asia - Chinese, Vietnamese, Japanese and Korean numerals chinese-formal - Chinese formal numerals Please contact us if you need another type of numerals. Example: <span class='pdfcrowd-page-number' data-pdfcrowd-number-format='roman'></span> data-pdfcrowd-placement - specifies where to place the source URL. Allowed values: The URL is inserted to the content Example: <span class='pdfcrowd-source-url'></span> will produce <span>http://example.com</span> href - the URL is set to the href attribute Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href'>Link to source</a> will produce <a href='http://example.com'>Link to source</a> href-and-content - the URL is set to the href attribute and to the content Example: <a class='pdfcrowd-source-url' data-pdfcrowd-placement='href-and-content'></a> will produce <a href='http://example.com'>http://example.com</a>
|
1248
1248
|
#
|
1249
1249
|
# * +html+ - The string must not be empty.
|
1250
1250
|
# * *Returns* - The converter object.
|
@@ -1703,6 +1703,28 @@ module Pdfcrowd
|
|
1703
1703
|
self
|
1704
1704
|
end
|
1705
1705
|
|
1706
|
+
# The main HTML element for conversion is detected automatically.
|
1707
|
+
#
|
1708
|
+
# * +value+ - Set to true to detect the main element.
|
1709
|
+
# * *Returns* - The converter object.
|
1710
|
+
def setAutoDetectElementToConvert(value)
|
1711
|
+
@fields['auto_detect_element_to_convert'] = value
|
1712
|
+
self
|
1713
|
+
end
|
1714
|
+
|
1715
|
+
# The input HTML is automatically enhanced to improve the readability.
|
1716
|
+
#
|
1717
|
+
# * +enhancements+ - Allowed values are none, readability-v1.
|
1718
|
+
# * *Returns* - The converter object.
|
1719
|
+
def setReadabilityEnhancements(enhancements)
|
1720
|
+
unless /(?i)^(none|readability-v1)$/.match(enhancements)
|
1721
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-pdf", "Allowed values are none, readability-v1.", "set_readability_enhancements"), 470);
|
1722
|
+
end
|
1723
|
+
|
1724
|
+
@fields['readability_enhancements'] = enhancements
|
1725
|
+
self
|
1726
|
+
end
|
1727
|
+
|
1706
1728
|
# Set the viewport width in pixels. The viewport is the user's visible area of the page.
|
1707
1729
|
#
|
1708
1730
|
# * +width+ - The value must be in the range 96-65000.
|
@@ -2838,6 +2860,28 @@ module Pdfcrowd
|
|
2838
2860
|
self
|
2839
2861
|
end
|
2840
2862
|
|
2863
|
+
# The main HTML element for conversion is detected automatically.
|
2864
|
+
#
|
2865
|
+
# * +value+ - Set to true to detect the main element.
|
2866
|
+
# * *Returns* - The converter object.
|
2867
|
+
def setAutoDetectElementToConvert(value)
|
2868
|
+
@fields['auto_detect_element_to_convert'] = value
|
2869
|
+
self
|
2870
|
+
end
|
2871
|
+
|
2872
|
+
# The input HTML is automatically enhanced to improve the readability.
|
2873
|
+
#
|
2874
|
+
# * +enhancements+ - Allowed values are none, readability-v1.
|
2875
|
+
# * *Returns* - The converter object.
|
2876
|
+
def setReadabilityEnhancements(enhancements)
|
2877
|
+
unless /(?i)^(none|readability-v1)$/.match(enhancements)
|
2878
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-image", "Allowed values are none, readability-v1.", "set_readability_enhancements"), 470);
|
2879
|
+
end
|
2880
|
+
|
2881
|
+
@fields['readability_enhancements'] = enhancements
|
2882
|
+
self
|
2883
|
+
end
|
2884
|
+
|
2841
2885
|
# Set the output image width in pixels.
|
2842
2886
|
#
|
2843
2887
|
# * +width+ - The value must be in the range 96-65000.
|
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.5.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: 2022-
|
11
|
+
date: 2022-03-25 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.
|