pdfcrowd 5.8.0 → 5.9.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 +23 -11
- 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: 1a5acbb283c6b75918ea9f34e667cbf48c1a6fb04527ddfb7635094306c40645
|
4
|
+
data.tar.gz: f4932f2c8cbe494a14c42dee45212d0eae455f1aadd560765e0aca046f8dfe8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc88c22538231821ac6ad2e99b8acdb3df27f5c0da3ff7339aa6e8bdde66cb970bbb4c4884b2abf90ba655a97dc1b656e502fad4637278a432cec390f96a252
|
7
|
+
data.tar.gz: 81937c8b7d2d32683b2f807d0da6f1b592d96607587fcbfd0c64f79a649fda1436462d2c7a2c58d2539a3fc2125a248908842ab853e4bdfd8503ff3dd0ee76ad
|
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.9.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.9.0 (https://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
@converter_version = '20.10'
|
@@ -597,6 +597,10 @@ module Pdfcrowd
|
|
597
597
|
@page_count
|
598
598
|
end
|
599
599
|
|
600
|
+
def getTotalPageCount()
|
601
|
+
@total_page_count
|
602
|
+
end
|
603
|
+
|
600
604
|
def getOutputSize()
|
601
605
|
@output_size
|
602
606
|
end
|
@@ -613,6 +617,7 @@ module Pdfcrowd
|
|
613
617
|
@consumed_credits = 0
|
614
618
|
@job_id = ''
|
615
619
|
@page_count = 0
|
620
|
+
@total_page_count = 0
|
616
621
|
@output_size = 0
|
617
622
|
@retry = 0
|
618
623
|
end
|
@@ -699,6 +704,7 @@ module Pdfcrowd
|
|
699
704
|
@consumed_credits = (response["X-Pdfcrowd-Consumed-Credits"] || 0).to_i
|
700
705
|
@job_id = response["X-Pdfcrowd-Job-Id"] || ''
|
701
706
|
@page_count = (response["X-Pdfcrowd-Pages"] || 0).to_i
|
707
|
+
@total_page_count = (response["X-Pdfcrowd-Total-Pages"] || 0).to_i
|
702
708
|
@output_size = (response["X-Pdfcrowd-Output-Size"] || 0).to_i
|
703
709
|
|
704
710
|
raise Error.new('test 502', '502') \
|
@@ -1714,11 +1720,11 @@ module Pdfcrowd
|
|
1714
1720
|
|
1715
1721
|
# The input HTML is automatically enhanced to improve the readability.
|
1716
1722
|
#
|
1717
|
-
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3.
|
1723
|
+
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3, readability-v4.
|
1718
1724
|
# * *Returns* - The converter object.
|
1719
1725
|
def setReadabilityEnhancements(enhancements)
|
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);
|
1726
|
+
unless /(?i)^(none|readability-v1|readability-v2|readability-v3|readability-v4)$/.match(enhancements)
|
1727
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-pdf", "Allowed values are none, readability-v1, readability-v2, readability-v3, readability-v4.", "set_readability_enhancements"), 470);
|
1722
1728
|
end
|
1723
1729
|
|
1724
1730
|
@fields['readability_enhancements'] = enhancements
|
@@ -2197,12 +2203,18 @@ module Pdfcrowd
|
|
2197
2203
|
return @helper.getJobId()
|
2198
2204
|
end
|
2199
2205
|
|
2200
|
-
# Get the
|
2206
|
+
# Get the number of pages in the output document.
|
2201
2207
|
# * *Returns* - The page count.
|
2202
2208
|
def getPageCount()
|
2203
2209
|
return @helper.getPageCount()
|
2204
2210
|
end
|
2205
2211
|
|
2212
|
+
# Get the total number of pages in the original output document, including the pages excluded by setPrintPageRange().
|
2213
|
+
# * *Returns* - The total page count.
|
2214
|
+
def getTotalPageCount()
|
2215
|
+
return @helper.getTotalPageCount()
|
2216
|
+
end
|
2217
|
+
|
2206
2218
|
# Get the size of the output in bytes.
|
2207
2219
|
# * *Returns* - The count of bytes.
|
2208
2220
|
def getOutputSize()
|
@@ -2880,11 +2892,11 @@ module Pdfcrowd
|
|
2880
2892
|
|
2881
2893
|
# The input HTML is automatically enhanced to improve the readability.
|
2882
2894
|
#
|
2883
|
-
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3.
|
2895
|
+
# * +enhancements+ - Allowed values are none, readability-v1, readability-v2, readability-v3, readability-v4.
|
2884
2896
|
# * *Returns* - The converter object.
|
2885
2897
|
def setReadabilityEnhancements(enhancements)
|
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);
|
2898
|
+
unless /(?i)^(none|readability-v1|readability-v2|readability-v3|readability-v4)$/.match(enhancements)
|
2899
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(enhancements, "setReadabilityEnhancements", "html-to-image", "Allowed values are none, readability-v1, readability-v2, readability-v3, readability-v4.", "set_readability_enhancements"), 470);
|
2888
2900
|
end
|
2889
2901
|
|
2890
2902
|
@fields['readability_enhancements'] = enhancements
|
@@ -4006,7 +4018,7 @@ module Pdfcrowd
|
|
4006
4018
|
return @helper.getJobId()
|
4007
4019
|
end
|
4008
4020
|
|
4009
|
-
# Get the
|
4021
|
+
# Get the number of pages in the output document.
|
4010
4022
|
# * *Returns* - The page count.
|
4011
4023
|
def getPageCount()
|
4012
4024
|
return @helper.getPageCount()
|
@@ -4791,7 +4803,7 @@ module Pdfcrowd
|
|
4791
4803
|
return @helper.getJobId()
|
4792
4804
|
end
|
4793
4805
|
|
4794
|
-
# Get the
|
4806
|
+
# Get the number of pages in the output document.
|
4795
4807
|
# * *Returns* - The page count.
|
4796
4808
|
def getPageCount()
|
4797
4809
|
return @helper.getPageCount()
|
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.9.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-10-03 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.
|