pdfcrowd 4.7.0 → 4.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 +73 -6
- 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: 115c1fddbe0db181bff579e1a43e000ee6c61745
|
4
|
+
data.tar.gz: 7248fe5e8ffa0eb345cdb355a44f4f3fbddd2188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78f137f5635f672eff2cf35efdbf3524b1b16b537bbe6cd73eae273993d4de9fff98559ad934f3caf917cd9cce262c47e5028dfbe98b747565347584c537593f
|
7
|
+
data.tar.gz: f5d85d580570928cf5c090689fe3873d302934a039e61586672062fe0769ffea99cfba237af8e1c28e68b92c69459646a7a57a17837914e5972e8b577f3a4a05
|
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.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/4.
|
544
|
+
setUserAgent('pdfcrowd_ruby_client/4.8.0 (http://pdfcrowd.com)')
|
545
545
|
|
546
546
|
@retry_count = 1
|
547
547
|
end
|
@@ -1223,6 +1223,73 @@ module Pdfcrowd
|
|
1223
1223
|
self
|
1224
1224
|
end
|
1225
1225
|
|
1226
|
+
# Set the top left X coordinate of the content area.
|
1227
|
+
#
|
1228
|
+
# * +content_area_x+ - Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.
|
1229
|
+
# * *Returns* - The converter object.
|
1230
|
+
def setContentAreaX(content_area_x)
|
1231
|
+
unless /(?i)^\-?[0-9]*(\.[0-9]+)?(pt|px|mm|cm|in)$/.match(content_area_x)
|
1232
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(content_area_x, "content_area_x", "html-to-pdf", "Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.", "set_content_area_x"), 470);
|
1233
|
+
end
|
1234
|
+
|
1235
|
+
@fields['content_area_x'] = content_area_x
|
1236
|
+
self
|
1237
|
+
end
|
1238
|
+
|
1239
|
+
# Set the top left Y coordinate of the content area.
|
1240
|
+
#
|
1241
|
+
# * +content_area_y+ - Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.
|
1242
|
+
# * *Returns* - The converter object.
|
1243
|
+
def setContentAreaY(content_area_y)
|
1244
|
+
unless /(?i)^\-?[0-9]*(\.[0-9]+)?(pt|px|mm|cm|in)$/.match(content_area_y)
|
1245
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(content_area_y, "content_area_y", "html-to-pdf", "Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.", "set_content_area_y"), 470);
|
1246
|
+
end
|
1247
|
+
|
1248
|
+
@fields['content_area_y'] = content_area_y
|
1249
|
+
self
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
# Set the width of the content area. It should be at least 1 inch.
|
1253
|
+
#
|
1254
|
+
# * +content_area_width+ - Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).
|
1255
|
+
# * *Returns* - The converter object.
|
1256
|
+
def setContentAreaWidth(content_area_width)
|
1257
|
+
unless /(?i)^[0-9]*(\.[0-9]+)?(pt|px|mm|cm|in)$/.match(content_area_width)
|
1258
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(content_area_width, "content_area_width", "html-to-pdf", "Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).", "set_content_area_width"), 470);
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
@fields['content_area_width'] = content_area_width
|
1262
|
+
self
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
# Set the height of the content area. It should be at least 1 inch.
|
1266
|
+
#
|
1267
|
+
# * +content_area_height+ - Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).
|
1268
|
+
# * *Returns* - The converter object.
|
1269
|
+
def setContentAreaHeight(content_area_height)
|
1270
|
+
unless /(?i)^[0-9]*(\.[0-9]+)?(pt|px|mm|cm|in)$/.match(content_area_height)
|
1271
|
+
raise Error.new(Pdfcrowd.create_invalid_value_message(content_area_height, "content_area_height", "html-to-pdf", "Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).", "set_content_area_height"), 470);
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
@fields['content_area_height'] = content_area_height
|
1275
|
+
self
|
1276
|
+
end
|
1277
|
+
|
1278
|
+
# Set the content area position and size. The content area enables to specify a web page area to be converted.
|
1279
|
+
#
|
1280
|
+
# * +x+ - Set the top left X coordinate of the content area. Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.
|
1281
|
+
# * +y+ - Set the top left Y coordinate of the content area. Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt). It may contain a negative value.
|
1282
|
+
# * +width+ - Set the width of the content area. It should be at least 1 inch. Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).
|
1283
|
+
# * +height+ - Set the height of the content area. It should be at least 1 inch. Can be specified in inches (in), millimeters (mm), centimeters (cm), or points (pt).
|
1284
|
+
# * *Returns* - The converter object.
|
1285
|
+
def setContentArea(x, y, width, height)
|
1286
|
+
setContentAreaX(x)
|
1287
|
+
setContentAreaY(y)
|
1288
|
+
setContentAreaWidth(width)
|
1289
|
+
setContentAreaHeight(height)
|
1290
|
+
self
|
1291
|
+
end
|
1292
|
+
|
1226
1293
|
# Do not print the background graphics.
|
1227
1294
|
#
|
1228
1295
|
# * +no_background+ - Set to true to disable the background graphics.
|
@@ -1360,7 +1427,7 @@ module Pdfcrowd
|
|
1360
1427
|
self
|
1361
1428
|
end
|
1362
1429
|
|
1363
|
-
# Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...).
|
1430
|
+
# Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
|
1364
1431
|
#
|
1365
1432
|
# * +custom_javascript+ - A string containing a JavaScript code. The string must not be empty.
|
1366
1433
|
# * *Returns* - The converter object.
|
@@ -1373,7 +1440,7 @@ module Pdfcrowd
|
|
1373
1440
|
self
|
1374
1441
|
end
|
1375
1442
|
|
1376
|
-
# Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation.
|
1443
|
+
# Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation. In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
|
1377
1444
|
#
|
1378
1445
|
# * +on_load_javascript+ - A string containing a JavaScript code. The string must not be empty.
|
1379
1446
|
# * *Returns* - The converter object.
|
@@ -2274,7 +2341,7 @@ module Pdfcrowd
|
|
2274
2341
|
self
|
2275
2342
|
end
|
2276
2343
|
|
2277
|
-
# Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...).
|
2344
|
+
# Run a custom JavaScript after the document is loaded and ready to print. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...). In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
|
2278
2345
|
#
|
2279
2346
|
# * +custom_javascript+ - A string containing a JavaScript code. The string must not be empty.
|
2280
2347
|
# * *Returns* - The converter object.
|
@@ -2287,7 +2354,7 @@ module Pdfcrowd
|
|
2287
2354
|
self
|
2288
2355
|
end
|
2289
2356
|
|
2290
|
-
# Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation.
|
2357
|
+
# Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation. In addition to the standard browser APIs, the custom JavaScript code can use helper functions from our JavaScript library.
|
2291
2358
|
#
|
2292
2359
|
# * +on_load_javascript+ - A string containing a JavaScript code. The string must not be empty.
|
2293
2360
|
# * *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: 4.
|
4
|
+
version: 4.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: 2019-
|
11
|
+
date: 2019-04-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.
|