pdfcrowd 5.12.0 → 5.13.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 +23 -14
- 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: f960da37e7c3184d59d432b8b3c023c7eb187f658e7f124d20b4b3d92ce6bf17
|
4
|
+
data.tar.gz: a5b87ba982098b105599746db23251f9050d12f159940233ade39b0447cae929
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79f3bfc9990447d45d6e388da9ff072fd30cb6bada3549e61439662d8041dc8fd2e5eb1c5ba496adf7539cfa6d49e17f327d99dd9e099e5779f55f7d1e24042
|
7
|
+
data.tar.gz: db213d0e3d657ed2e5d66498470c810a3703fd6cb6a8631ce15eec33442d5b398ab655423dfc18d4ee13a012bc7e19c135e5be93ade21a808a9858d58cf8cdc5
|
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.13.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.13.0 (https://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
@converter_version = '20.10'
|
@@ -681,7 +681,7 @@ module Pdfcrowd
|
|
681
681
|
begin
|
682
682
|
return exec_request(request, out_stream)
|
683
683
|
rescue Error => err
|
684
|
-
if err.getCode() == '502' and @retry_count > @retry
|
684
|
+
if (err.getCode() == '502' or err.getCode() == '503') and @retry_count > @retry
|
685
685
|
@retry += 1
|
686
686
|
sleep(@retry * 0.1)
|
687
687
|
else
|
@@ -707,10 +707,6 @@ module Pdfcrowd
|
|
707
707
|
@total_page_count = (response["X-Pdfcrowd-Total-Pages"] || 0).to_i
|
708
708
|
@output_size = (response["X-Pdfcrowd-Output-Size"] || 0).to_i
|
709
709
|
|
710
|
-
raise Error.new('test 502', '502') \
|
711
|
-
if ENV["PDFCROWD_UNIT_TEST_MODE"] and
|
712
|
-
@retry_count > @retry
|
713
|
-
|
714
710
|
case response
|
715
711
|
when Net::HTTPSuccess
|
716
712
|
if out_stream
|
@@ -1189,6 +1185,19 @@ module Pdfcrowd
|
|
1189
1185
|
self
|
1190
1186
|
end
|
1191
1187
|
|
1188
|
+
# Specifies which blank pages to exclude from the output document.
|
1189
|
+
#
|
1190
|
+
# * +pages+ - The empty page behavior. Allowed values are trailing, none.
|
1191
|
+
# * *Returns* - The converter object.
|
1192
|
+
def setRemoveBlankPages(pages)
|
1193
|
+
unless /(?i)^(trailing|none)$/.match(pages)
|
1194
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(pages, "setRemoveBlankPages", "html-to-pdf", "Allowed values are trailing, none.", "set_remove_blank_pages"), 470);
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
@fields['remove_blank_pages'] = pages
|
1198
|
+
self
|
1199
|
+
end
|
1200
|
+
|
1192
1201
|
# 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>
|
1193
1202
|
#
|
1194
1203
|
# * +url+ - The supported protocols are http:// and https://.
|
@@ -2396,7 +2405,7 @@ module Pdfcrowd
|
|
2396
2405
|
self
|
2397
2406
|
end
|
2398
2407
|
|
2399
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
2408
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
2400
2409
|
#
|
2401
2410
|
# * +count+ - Number of retries.
|
2402
2411
|
# * *Returns* - The converter object.
|
@@ -3180,7 +3189,7 @@ module Pdfcrowd
|
|
3180
3189
|
self
|
3181
3190
|
end
|
3182
3191
|
|
3183
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
3192
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
3184
3193
|
#
|
3185
3194
|
# * +count+ - Number of retries.
|
3186
3195
|
# * *Returns* - The converter object.
|
@@ -3788,7 +3797,7 @@ module Pdfcrowd
|
|
3788
3797
|
self
|
3789
3798
|
end
|
3790
3799
|
|
3791
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
3800
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
3792
3801
|
#
|
3793
3802
|
# * +count+ - Number of retries.
|
3794
3803
|
# * *Returns* - The converter object.
|
@@ -4356,7 +4365,7 @@ module Pdfcrowd
|
|
4356
4365
|
self
|
4357
4366
|
end
|
4358
4367
|
|
4359
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
4368
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
4360
4369
|
#
|
4361
4370
|
# * +count+ - Number of retries.
|
4362
4371
|
# * *Returns* - The converter object.
|
@@ -5273,7 +5282,7 @@ module Pdfcrowd
|
|
5273
5282
|
self
|
5274
5283
|
end
|
5275
5284
|
|
5276
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
5285
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
5277
5286
|
#
|
5278
5287
|
# * +count+ - Number of retries.
|
5279
5288
|
# * *Returns* - The converter object.
|
@@ -5730,7 +5739,7 @@ module Pdfcrowd
|
|
5730
5739
|
self
|
5731
5740
|
end
|
5732
5741
|
|
5733
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
5742
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
5734
5743
|
#
|
5735
5744
|
# * +count+ - Number of retries.
|
5736
5745
|
# * *Returns* - The converter object.
|
@@ -6229,7 +6238,7 @@ module Pdfcrowd
|
|
6229
6238
|
self
|
6230
6239
|
end
|
6231
6240
|
|
6232
|
-
# Specifies the number of automatic retries when the 502 HTTP status code is received. The
|
6241
|
+
# Specifies the number of automatic retries when the 502 or 503 HTTP status code is received. The status code indicates a temporary network issue. This feature can be disabled by setting to 0.
|
6233
6242
|
#
|
6234
6243
|
# * +count+ - Number of retries.
|
6235
6244
|
# * *Returns* - The converter object.
|
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.13.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-03-30 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.
|