pdfcrowd 5.6.1 → 5.8.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 +33 -33
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '029e466dda9be9175a1854d7326c527367bc675373f33516835ae607f327d31b'
|
4
|
+
data.tar.gz: 2bc1dcb8dd2bd9a19938008d265be5991fcaac87825d5eaadb39d29bd8c8990d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4478b95d606c97b4ac5023b1f780f1d648cdac6a9b958c8aff1372d687ea3426a879a7de11536f1ecf2b56fc9f00631d9c1b48838a5772daf44e674b63822400
|
7
|
+
data.tar.gz: baa4d81f298f629a6d5323c5d332a4920da36db054fe1c0ac52951cd21703cd39c17b406ae356e99fa6985514cf2fb73cd74ad585ff13db1728b27b402f2d0da
|
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.8.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.8.0 (https://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
@converter_version = '20.10'
|
@@ -735,7 +735,7 @@ module Pdfcrowd
|
|
735
735
|
def self.create_invalid_value_message(value, field, converter, hint, id)
|
736
736
|
message = "Invalid value '%s' for %s." % [value, field]
|
737
737
|
message += " " + hint if hint
|
738
|
-
return message + " " + "Details: https://www.pdfcrowd.com/
|
738
|
+
return message + " " + "Details: https://www.pdfcrowd.com/api/%s-ruby/ref/#%s" % [converter, id]
|
739
739
|
end
|
740
740
|
|
741
741
|
# generated code
|
@@ -1327,9 +1327,9 @@ module Pdfcrowd
|
|
1327
1327
|
self
|
1328
1328
|
end
|
1329
1329
|
|
1330
|
-
# Apply
|
1330
|
+
# Apply a watermark to each page of the output PDF file. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark.
|
1331
1331
|
#
|
1332
|
-
# * +watermark+ - The file path to a local
|
1332
|
+
# * +watermark+ - The file path to a local file. The file must exist and not be empty.
|
1333
1333
|
# * *Returns* - The converter object.
|
1334
1334
|
def setPageWatermark(watermark)
|
1335
1335
|
if (!(File.file?(watermark) && !File.zero?(watermark)))
|
@@ -1340,7 +1340,7 @@ module Pdfcrowd
|
|
1340
1340
|
self
|
1341
1341
|
end
|
1342
1342
|
|
1343
|
-
# Load a
|
1343
|
+
# Load a file from the specified URL and apply the file as a watermark to each page of the output PDF. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark.
|
1344
1344
|
#
|
1345
1345
|
# * +url+ - The supported protocols are http:// and https://.
|
1346
1346
|
# * *Returns* - The converter object.
|
@@ -1353,9 +1353,9 @@ module Pdfcrowd
|
|
1353
1353
|
self
|
1354
1354
|
end
|
1355
1355
|
|
1356
|
-
# Apply each page of
|
1356
|
+
# Apply each page of a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image.
|
1357
1357
|
#
|
1358
|
-
# * +watermark+ - The file path to a local
|
1358
|
+
# * +watermark+ - The file path to a local file. The file must exist and not be empty.
|
1359
1359
|
# * *Returns* - The converter object.
|
1360
1360
|
def setMultipageWatermark(watermark)
|
1361
1361
|
if (!(File.file?(watermark) && !File.zero?(watermark)))
|
@@ -1366,7 +1366,7 @@ module Pdfcrowd
|
|
1366
1366
|
self
|
1367
1367
|
end
|
1368
1368
|
|
1369
|
-
# Load a
|
1369
|
+
# Load a file from the specified URL and apply each page of the file as a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image.
|
1370
1370
|
#
|
1371
1371
|
# * +url+ - The supported protocols are http:// and https://.
|
1372
1372
|
# * *Returns* - The converter object.
|
@@ -1379,9 +1379,9 @@ module Pdfcrowd
|
|
1379
1379
|
self
|
1380
1380
|
end
|
1381
1381
|
|
1382
|
-
# Apply
|
1382
|
+
# Apply a background to each page of the output PDF file. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background.
|
1383
1383
|
#
|
1384
|
-
# * +background+ - The file path to a local
|
1384
|
+
# * +background+ - The file path to a local file. The file must exist and not be empty.
|
1385
1385
|
# * *Returns* - The converter object.
|
1386
1386
|
def setPageBackground(background)
|
1387
1387
|
if (!(File.file?(background) && !File.zero?(background)))
|
@@ -1392,7 +1392,7 @@ module Pdfcrowd
|
|
1392
1392
|
self
|
1393
1393
|
end
|
1394
1394
|
|
1395
|
-
# Load a
|
1395
|
+
# Load a file from the specified URL and apply the file as a background to each page of the output PDF. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background.
|
1396
1396
|
#
|
1397
1397
|
# * +url+ - The supported protocols are http:// and https://.
|
1398
1398
|
# * *Returns* - The converter object.
|
@@ -1405,9 +1405,9 @@ module Pdfcrowd
|
|
1405
1405
|
self
|
1406
1406
|
end
|
1407
1407
|
|
1408
|
-
# Apply each page of
|
1408
|
+
# Apply each page of a background to the corresponding page of the output PDF. A background can be either a PDF or an image.
|
1409
1409
|
#
|
1410
|
-
# * +background+ - The file path to a local
|
1410
|
+
# * +background+ - The file path to a local file. The file must exist and not be empty.
|
1411
1411
|
# * *Returns* - The converter object.
|
1412
1412
|
def setMultipageBackground(background)
|
1413
1413
|
if (!(File.file?(background) && !File.zero?(background)))
|
@@ -1418,7 +1418,7 @@ module Pdfcrowd
|
|
1418
1418
|
self
|
1419
1419
|
end
|
1420
1420
|
|
1421
|
-
# Load a
|
1421
|
+
# Load a file from the specified URL and apply each page of the file as a background to the corresponding page of the output PDF. A background can be either a PDF or an image.
|
1422
1422
|
#
|
1423
1423
|
# * +url+ - The supported protocols are http:// and https://.
|
1424
1424
|
# * *Returns* - The converter object.
|
@@ -1714,11 +1714,11 @@ module Pdfcrowd
|
|
1714
1714
|
|
1715
1715
|
# The input HTML is automatically enhanced to improve the readability.
|
1716
1716
|
#
|
1717
|
-
# * +enhancements+ - Allowed values are none, readability-v1.
|
1717
|
+
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3.
|
1718
1718
|
# * *Returns* - The converter object.
|
1719
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);
|
1720
|
+
unless /(?i)^(none|readability-v1|readability-v2|readability-v3)$/.match(enhancements)
|
1721
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-pdf", "Allowed values are none, readability-v1, readability-v2, readability-v3.", "set_readability_enhancements"), 470);
|
1722
1722
|
end
|
1723
1723
|
|
1724
1724
|
@fields['readability_enhancements'] = enhancements
|
@@ -2880,11 +2880,11 @@ module Pdfcrowd
|
|
2880
2880
|
|
2881
2881
|
# The input HTML is automatically enhanced to improve the readability.
|
2882
2882
|
#
|
2883
|
-
# * +enhancements+ - Allowed values are none, readability-v1.
|
2883
|
+
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3.
|
2884
2884
|
# * *Returns* - The converter object.
|
2885
2885
|
def setReadabilityEnhancements(enhancements)
|
2886
|
-
unless /(?i)^(none|readability-v1)$/.match(enhancements)
|
2887
|
-
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-image", "Allowed values are none, readability-v1.", "set_readability_enhancements"), 470);
|
2886
|
+
unless /(?i)^(none|readability-v1|readability-v2|readability-v3)$/.match(enhancements)
|
2887
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-image", "Allowed values are none, readability-v1, readability-v2, readability-v3.", "set_readability_enhancements"), 470);
|
2888
2888
|
end
|
2889
2889
|
|
2890
2890
|
@fields['readability_enhancements'] = enhancements
|
@@ -3626,9 +3626,9 @@ module Pdfcrowd
|
|
3626
3626
|
self
|
3627
3627
|
end
|
3628
3628
|
|
3629
|
-
# Apply
|
3629
|
+
# Apply a watermark to each page of the output PDF file. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark.
|
3630
3630
|
#
|
3631
|
-
# * +watermark+ - The file path to a local
|
3631
|
+
# * +watermark+ - The file path to a local file. The file must exist and not be empty.
|
3632
3632
|
# * *Returns* - The converter object.
|
3633
3633
|
def setPageWatermark(watermark)
|
3634
3634
|
if (!(File.file?(watermark) && !File.zero?(watermark)))
|
@@ -3639,7 +3639,7 @@ module Pdfcrowd
|
|
3639
3639
|
self
|
3640
3640
|
end
|
3641
3641
|
|
3642
|
-
# Load a
|
3642
|
+
# Load a file from the specified URL and apply the file as a watermark to each page of the output PDF. A watermark can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the watermark.
|
3643
3643
|
#
|
3644
3644
|
# * +url+ - The supported protocols are http:// and https://.
|
3645
3645
|
# * *Returns* - The converter object.
|
@@ -3652,9 +3652,9 @@ module Pdfcrowd
|
|
3652
3652
|
self
|
3653
3653
|
end
|
3654
3654
|
|
3655
|
-
# Apply each page of
|
3655
|
+
# Apply each page of a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image.
|
3656
3656
|
#
|
3657
|
-
# * +watermark+ - The file path to a local
|
3657
|
+
# * +watermark+ - The file path to a local file. The file must exist and not be empty.
|
3658
3658
|
# * *Returns* - The converter object.
|
3659
3659
|
def setMultipageWatermark(watermark)
|
3660
3660
|
if (!(File.file?(watermark) && !File.zero?(watermark)))
|
@@ -3665,7 +3665,7 @@ module Pdfcrowd
|
|
3665
3665
|
self
|
3666
3666
|
end
|
3667
3667
|
|
3668
|
-
# Load a
|
3668
|
+
# Load a file from the specified URL and apply each page of the file as a watermark to the corresponding page of the output PDF. A watermark can be either a PDF or an image.
|
3669
3669
|
#
|
3670
3670
|
# * +url+ - The supported protocols are http:// and https://.
|
3671
3671
|
# * *Returns* - The converter object.
|
@@ -3678,9 +3678,9 @@ module Pdfcrowd
|
|
3678
3678
|
self
|
3679
3679
|
end
|
3680
3680
|
|
3681
|
-
# Apply
|
3681
|
+
# Apply a background to each page of the output PDF file. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background.
|
3682
3682
|
#
|
3683
|
-
# * +background+ - The file path to a local
|
3683
|
+
# * +background+ - The file path to a local file. The file must exist and not be empty.
|
3684
3684
|
# * *Returns* - The converter object.
|
3685
3685
|
def setPageBackground(background)
|
3686
3686
|
if (!(File.file?(background) && !File.zero?(background)))
|
@@ -3691,7 +3691,7 @@ module Pdfcrowd
|
|
3691
3691
|
self
|
3692
3692
|
end
|
3693
3693
|
|
3694
|
-
# Load a
|
3694
|
+
# Load a file from the specified URL and apply the file as a background to each page of the output PDF. A background can be either a PDF or an image. If a multi-page file (PDF or TIFF) is used, the first page is used as the background.
|
3695
3695
|
#
|
3696
3696
|
# * +url+ - The supported protocols are http:// and https://.
|
3697
3697
|
# * *Returns* - The converter object.
|
@@ -3704,9 +3704,9 @@ module Pdfcrowd
|
|
3704
3704
|
self
|
3705
3705
|
end
|
3706
3706
|
|
3707
|
-
# Apply each page of
|
3707
|
+
# Apply each page of a background to the corresponding page of the output PDF. A background can be either a PDF or an image.
|
3708
3708
|
#
|
3709
|
-
# * +background+ - The file path to a local
|
3709
|
+
# * +background+ - The file path to a local file. The file must exist and not be empty.
|
3710
3710
|
# * *Returns* - The converter object.
|
3711
3711
|
def setMultipageBackground(background)
|
3712
3712
|
if (!(File.file?(background) && !File.zero?(background)))
|
@@ -3717,7 +3717,7 @@ module Pdfcrowd
|
|
3717
3717
|
self
|
3718
3718
|
end
|
3719
3719
|
|
3720
|
-
# Load a
|
3720
|
+
# Load a file from the specified URL and apply each page of the file as a background to the corresponding page of the output PDF. A background can be either a PDF or an image.
|
3721
3721
|
#
|
3722
3722
|
# * +url+ - The supported protocols are http:// and https://.
|
3723
3723
|
# * *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.8.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-09-05 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.
|
@@ -18,7 +18,7 @@ extensions: []
|
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
20
|
- lib/pdfcrowd.rb
|
21
|
-
homepage: https://pdfcrowd.com/
|
21
|
+
homepage: https://pdfcrowd.com/api/
|
22
22
|
licenses:
|
23
23
|
- MIT
|
24
24
|
metadata: {}
|