pdfcrowd 4.10.0 → 4.11.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 +106 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0d1b16199c6019f63d1edc09ac55dfb3abe4e8d
|
4
|
+
data.tar.gz: acbcfeb78be46f671a6d59d384f476e390298559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d30398b8bc2bc11e99a93b5a64d35b2f21d48d6712754a98efcf749c3b8cf893fb4ea97f78a5939401d4109c58fa88c5e43cef6e819fb60c3e968d890547e80
|
7
|
+
data.tar.gz: 68a7c0410c0a90482bc7746ddaebc9c583b5f5eb106840d8cfefdc8fa0376221d63d2f13c9a36eeedf3f4d0c83f9bca1b9de5b5b1886345e657bdb03a5dcbd19
|
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 = '4.
|
533
|
+
CLIENT_VERSION = '4.11.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/4.
|
544
|
+
setUserAgent('pdfcrowd_ruby_client/4.11.0 (http://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
end
|
@@ -1231,6 +1231,19 @@ module Pdfcrowd
|
|
1231
1231
|
self
|
1232
1232
|
end
|
1233
1233
|
|
1234
|
+
# Load a watermark PDF from the specified URL and apply the first page of the watermark PDF to every page of the output PDF.
|
1235
|
+
#
|
1236
|
+
# * +page_watermark_url+ - The supported protocols are http:// and https://.
|
1237
|
+
# * *Returns* - The converter object.
|
1238
|
+
def setPageWatermarkUrl(page_watermark_url)
|
1239
|
+
unless /(?i)^https?:\/\/.*$/.match(page_watermark_url)
|
1240
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(page_watermark_url, "page_watermark_url", "html-to-pdf", "The supported protocols are http:// and https://.", "set_page_watermark_url"), 470);
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
@fields['page_watermark_url'] = page_watermark_url
|
1244
|
+
self
|
1245
|
+
end
|
1246
|
+
|
1234
1247
|
# Apply each page of the specified watermark PDF to the corresponding page of the output PDF.
|
1235
1248
|
#
|
1236
1249
|
# * +multipage_watermark+ - The file path to a local watermark PDF file. The file must exist and not be empty.
|
@@ -1244,6 +1257,19 @@ module Pdfcrowd
|
|
1244
1257
|
self
|
1245
1258
|
end
|
1246
1259
|
|
1260
|
+
# Load a watermark PDF from the specified URL and apply each page of the specified watermark PDF to the corresponding page of the output PDF.
|
1261
|
+
#
|
1262
|
+
# * +multipage_watermark_url+ - The supported protocols are http:// and https://.
|
1263
|
+
# * *Returns* - The converter object.
|
1264
|
+
def setMultipageWatermarkUrl(multipage_watermark_url)
|
1265
|
+
unless /(?i)^https?:\/\/.*$/.match(multipage_watermark_url)
|
1266
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(multipage_watermark_url, "multipage_watermark_url", "html-to-pdf", "The supported protocols are http:// and https://.", "set_multipage_watermark_url"), 470);
|
1267
|
+
end
|
1268
|
+
|
1269
|
+
@fields['multipage_watermark_url'] = multipage_watermark_url
|
1270
|
+
self
|
1271
|
+
end
|
1272
|
+
|
1247
1273
|
# Apply the first page of the specified PDF to the background of every page of the output PDF.
|
1248
1274
|
#
|
1249
1275
|
# * +page_background+ - The file path to a local background PDF file. The file must exist and not be empty.
|
@@ -1257,6 +1283,19 @@ module Pdfcrowd
|
|
1257
1283
|
self
|
1258
1284
|
end
|
1259
1285
|
|
1286
|
+
# Load a background PDF from the specified URL and apply the first page of the background PDF to every page of the output PDF.
|
1287
|
+
#
|
1288
|
+
# * +page_background_url+ - The supported protocols are http:// and https://.
|
1289
|
+
# * *Returns* - The converter object.
|
1290
|
+
def setPageBackgroundUrl(page_background_url)
|
1291
|
+
unless /(?i)^https?:\/\/.*$/.match(page_background_url)
|
1292
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(page_background_url, "page_background_url", "html-to-pdf", "The supported protocols are http:// and https://.", "set_page_background_url"), 470);
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
@fields['page_background_url'] = page_background_url
|
1296
|
+
self
|
1297
|
+
end
|
1298
|
+
|
1260
1299
|
# Apply each page of the specified PDF to the background of the corresponding page of the output PDF.
|
1261
1300
|
#
|
1262
1301
|
# * +multipage_background+ - The file path to a local background PDF file. The file must exist and not be empty.
|
@@ -1270,6 +1309,19 @@ module Pdfcrowd
|
|
1270
1309
|
self
|
1271
1310
|
end
|
1272
1311
|
|
1312
|
+
# Load a background PDF from the specified URL and apply each page of the specified background PDF to the corresponding page of the output PDF.
|
1313
|
+
#
|
1314
|
+
# * +multipage_background_url+ - The supported protocols are http:// and https://.
|
1315
|
+
# * *Returns* - The converter object.
|
1316
|
+
def setMultipageBackgroundUrl(multipage_background_url)
|
1317
|
+
unless /(?i)^https?:\/\/.*$/.match(multipage_background_url)
|
1318
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(multipage_background_url, "multipage_background_url", "html-to-pdf", "The supported protocols are http:// and https://.", "set_multipage_background_url"), 470);
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
@fields['multipage_background_url'] = multipage_background_url
|
1322
|
+
self
|
1323
|
+
end
|
1324
|
+
|
1273
1325
|
# The page background color in RGB or RGBA hexadecimal format. The color fills the entire page regardless of the margins.
|
1274
1326
|
#
|
1275
1327
|
# * +page_background_color+ - The value must be in RRGGBB or RRGGBBAA hexadecimal format.
|
@@ -2989,6 +3041,19 @@ module Pdfcrowd
|
|
2989
3041
|
self
|
2990
3042
|
end
|
2991
3043
|
|
3044
|
+
# Load a watermark PDF from the specified URL and apply the first page of the watermark PDF to every page of the output PDF.
|
3045
|
+
#
|
3046
|
+
# * +page_watermark_url+ - The supported protocols are http:// and https://.
|
3047
|
+
# * *Returns* - The converter object.
|
3048
|
+
def setPageWatermarkUrl(page_watermark_url)
|
3049
|
+
unless /(?i)^https?:\/\/.*$/.match(page_watermark_url)
|
3050
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(page_watermark_url, "page_watermark_url", "pdf-to-pdf", "The supported protocols are http:// and https://.", "set_page_watermark_url"), 470);
|
3051
|
+
end
|
3052
|
+
|
3053
|
+
@fields['page_watermark_url'] = page_watermark_url
|
3054
|
+
self
|
3055
|
+
end
|
3056
|
+
|
2992
3057
|
# Apply each page of the specified watermark PDF to the corresponding page of the output PDF.
|
2993
3058
|
#
|
2994
3059
|
# * +multipage_watermark+ - The file path to a local watermark PDF file. The file must exist and not be empty.
|
@@ -3002,6 +3067,19 @@ module Pdfcrowd
|
|
3002
3067
|
self
|
3003
3068
|
end
|
3004
3069
|
|
3070
|
+
# Load a watermark PDF from the specified URL and apply each page of the specified watermark PDF to the corresponding page of the output PDF.
|
3071
|
+
#
|
3072
|
+
# * +multipage_watermark_url+ - The supported protocols are http:// and https://.
|
3073
|
+
# * *Returns* - The converter object.
|
3074
|
+
def setMultipageWatermarkUrl(multipage_watermark_url)
|
3075
|
+
unless /(?i)^https?:\/\/.*$/.match(multipage_watermark_url)
|
3076
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(multipage_watermark_url, "multipage_watermark_url", "pdf-to-pdf", "The supported protocols are http:// and https://.", "set_multipage_watermark_url"), 470);
|
3077
|
+
end
|
3078
|
+
|
3079
|
+
@fields['multipage_watermark_url'] = multipage_watermark_url
|
3080
|
+
self
|
3081
|
+
end
|
3082
|
+
|
3005
3083
|
# Apply the first page of the specified PDF to the background of every page of the output PDF.
|
3006
3084
|
#
|
3007
3085
|
# * +page_background+ - The file path to a local background PDF file. The file must exist and not be empty.
|
@@ -3015,6 +3093,19 @@ module Pdfcrowd
|
|
3015
3093
|
self
|
3016
3094
|
end
|
3017
3095
|
|
3096
|
+
# Load a background PDF from the specified URL and apply the first page of the background PDF to every page of the output PDF.
|
3097
|
+
#
|
3098
|
+
# * +page_background_url+ - The supported protocols are http:// and https://.
|
3099
|
+
# * *Returns* - The converter object.
|
3100
|
+
def setPageBackgroundUrl(page_background_url)
|
3101
|
+
unless /(?i)^https?:\/\/.*$/.match(page_background_url)
|
3102
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(page_background_url, "page_background_url", "pdf-to-pdf", "The supported protocols are http:// and https://.", "set_page_background_url"), 470);
|
3103
|
+
end
|
3104
|
+
|
3105
|
+
@fields['page_background_url'] = page_background_url
|
3106
|
+
self
|
3107
|
+
end
|
3108
|
+
|
3018
3109
|
# Apply each page of the specified PDF to the background of the corresponding page of the output PDF.
|
3019
3110
|
#
|
3020
3111
|
# * +multipage_background+ - The file path to a local background PDF file. The file must exist and not be empty.
|
@@ -3028,6 +3119,19 @@ module Pdfcrowd
|
|
3028
3119
|
self
|
3029
3120
|
end
|
3030
3121
|
|
3122
|
+
# Load a background PDF from the specified URL and apply each page of the specified background PDF to the corresponding page of the output PDF.
|
3123
|
+
#
|
3124
|
+
# * +multipage_background_url+ - The supported protocols are http:// and https://.
|
3125
|
+
# * *Returns* - The converter object.
|
3126
|
+
def setMultipageBackgroundUrl(multipage_background_url)
|
3127
|
+
unless /(?i)^https?:\/\/.*$/.match(multipage_background_url)
|
3128
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(multipage_background_url, "multipage_background_url", "pdf-to-pdf", "The supported protocols are http:// and https://.", "set_multipage_background_url"), 470);
|
3129
|
+
end
|
3130
|
+
|
3131
|
+
@fields['multipage_background_url'] = multipage_background_url
|
3132
|
+
self
|
3133
|
+
end
|
3134
|
+
|
3031
3135
|
# Create linearized PDF. This is also known as Fast Web View.
|
3032
3136
|
#
|
3033
3137
|
# * +linearize+ - Set to true to create linearized PDF.
|
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: 4.
|
4
|
+
version: 4.11.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: 2019-
|
11
|
+
date: 2019-10-04 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.
|