pdfcrowd 5.12.1 → 5.13.1
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 +19 -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: f3b46f24d1656d84d213fa15a588861bc11e4bedc6bd93ac5a87b3c2e50a25ca
|
4
|
+
data.tar.gz: 154772540e506f59ffbd6c3cc64e25e859482e2845c230a10eb7ac5e4dc47a2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f91d281e04c15b4236d4360cb94ae82da42fc2c7ca9da4db7e9176b1803047e514f6eebacf3b942c0a9e37d515ae8efb698a2453bd1b5c4bb209ab609053f90b
|
7
|
+
data.tar.gz: 8e2c56c82011c3095e3f44976d28920b43245f3597be42d3eea68c2decb057f68bd2a0b6f45dd7eadc8c41850c17fd53686a496ee8372988d864e1bd41cf724d
|
data/lib/pdfcrowd.rb
CHANGED
@@ -191,12 +191,12 @@ module Pdfcrowd
|
|
191
191
|
end
|
192
192
|
|
193
193
|
def setPageLayout(value)
|
194
|
-
|
194
|
+
assert_pdfcrowd { value > 0 and value <= 3 }
|
195
195
|
@fields['page_layout'] = value
|
196
196
|
end
|
197
197
|
|
198
198
|
def setPageMode(value)
|
199
|
-
|
199
|
+
assert_pdfcrowd { value > 0 and value <= 3 }
|
200
200
|
@fields['page_mode'] = value
|
201
201
|
end
|
202
202
|
|
@@ -242,7 +242,7 @@ module Pdfcrowd
|
|
242
242
|
end
|
243
243
|
|
244
244
|
def setInitialPdfZoomType(value)
|
245
|
-
|
245
|
+
assert_pdfcrowd { value>0 and value<=3 }
|
246
246
|
@fields['initial_pdf_zoom_type'] = value
|
247
247
|
end
|
248
248
|
|
@@ -400,7 +400,7 @@ end
|
|
400
400
|
end
|
401
401
|
|
402
402
|
|
403
|
-
def
|
403
|
+
def assert_pdfcrowd
|
404
404
|
raise "Assertion failed !" unless yield
|
405
405
|
end
|
406
406
|
|
@@ -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.1'
|
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.1 (https://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
@converter_version = '20.10'
|
@@ -1185,6 +1185,19 @@ module Pdfcrowd
|
|
1185
1185
|
self
|
1186
1186
|
end
|
1187
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
|
+
|
1188
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>
|
1189
1202
|
#
|
1190
1203
|
# * +url+ - The supported protocols are http:// and https://.
|
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.1
|
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-02
|
11
|
+
date: 2023-05-02 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.
|