pdfcrowd 4.4.2 → 4.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfcrowd.rb +40 -14
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df0f634e6fd4179d59c27374bca727145e33d834
4
- data.tar.gz: 7835a6b9caa209ee4d2c9d29e2ed498dbb592906
3
+ metadata.gz: 831c75863b744daaf04e10c823d0f2372f8d1449
4
+ data.tar.gz: e073a4c1a3fe5781071de35d74cff853e58e2dca
5
5
  SHA512:
6
- metadata.gz: 106fcf8b64482a784f7655ece03bb3f8ffbb2b986e34491620b2ac188b7d8e8a66ebf5dc3e632cbbc623981a809f5d50704a1a009f7b3d581e147651cec60a42
7
- data.tar.gz: 5ddf56c46fc7258e5283e9d24444b0b0d723e588b972cb4f0f4a3fbc78710e7f18081161ecb0d63f81a35f21f80b9af78dc4334802498529ca689eb9bf3d7748
6
+ metadata.gz: f2b8be81e58098579b3afd6a88d50f3dffe7fe71b2ef430fc097cc9c449ca8cc39a36bb4cc636caf40e334c82d7d29af37a04374d5805d5f51a42d5515d9e56a
7
+ data.tar.gz: e92afe264b5c4e7ca09faca17704d51875c5795347e0a71030eb1cb97ed91751ffe152112fbc54e9242b418e204e56bdc2708b15c91f58aeb4334955f73e8288
@@ -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.4.2'
533
+ CLIENT_VERSION = '4.5.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.4.2 (http://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/4.5.0 (http://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  end
@@ -1360,9 +1360,9 @@ module Pdfcrowd
1360
1360
  self
1361
1361
  end
1362
1362
 
1363
- # Run a custom JavaScript after the document is loaded. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...).
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, ...). The custom JavaScript can use helper functions from our JavaScript library.
1364
1364
  #
1365
- # * +custom_javascript+ - String containing a JavaScript code. The string must not be empty.
1365
+ # * +custom_javascript+ - A string containing a JavaScript code. The string must not be empty.
1366
1366
  # * *Returns* - The converter object.
1367
1367
  def setCustomJavascript(custom_javascript)
1368
1368
  if (!(!custom_javascript.nil? && !custom_javascript.empty?))
@@ -1373,6 +1373,19 @@ module Pdfcrowd
1373
1373
  self
1374
1374
  end
1375
1375
 
1376
+ # Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation. The custom JavaScript can use helper functions from our JavaScript library.
1377
+ #
1378
+ # * +on_load_javascript+ - A string containing a JavaScript code. The string must not be empty.
1379
+ # * *Returns* - The converter object.
1380
+ def setOnLoadJavascript(on_load_javascript)
1381
+ if (!(!on_load_javascript.nil? && !on_load_javascript.empty?))
1382
+ raise Error.new(Pdfcrowd.create_invalid_value_message(on_load_javascript, "on_load_javascript", "html-to-pdf", "The string must not be empty.", "set_on_load_javascript"), 470);
1383
+ end
1384
+
1385
+ @fields['on_load_javascript'] = on_load_javascript
1386
+ self
1387
+ end
1388
+
1376
1389
  # Set a custom HTTP header that is sent in Pdfcrowd HTTP requests.
1377
1390
  #
1378
1391
  # * +custom_http_header+ - A string containing the header name and value separated by a colon.
@@ -1523,7 +1536,7 @@ module Pdfcrowd
1523
1536
  self
1524
1537
  end
1525
1538
 
1526
- # Set the quality of embedded JPEG images. Lower quality results in smaller PDF file. Lower quality affects printing or zooming in a PDF viewer.
1539
+ # Set the quality of embedded JPEG images. A lower quality results in a smaller PDF file but can lead to compression artifacts.
1527
1540
  #
1528
1541
  # * +jpeg_quality+ - The percentage value. The value must be in the range 1-100.
1529
1542
  # * *Returns* - The converter object.
@@ -1536,7 +1549,7 @@ module Pdfcrowd
1536
1549
  self
1537
1550
  end
1538
1551
 
1539
- # Set image categories to be converted into embedded JPEG images. The conversion into JPEG may result in smaller PDF file.
1552
+ # Specify which image types will be converted to JPEG. Converting lossless compression image formats (PNG, GIF, ...) to JPEG may result in a smaller PDF file.
1540
1553
  #
1541
1554
  # * +convert_images_to_jpeg+ - The image category. Allowed values are none, opaque, all.
1542
1555
  # * *Returns* - The converter object.
@@ -1549,7 +1562,7 @@ module Pdfcrowd
1549
1562
  self
1550
1563
  end
1551
1564
 
1552
- # Set the DPI when embedded image is scaled down. Lower DPI may result in smaller PDF file. Lower DPI affects printing or zooming in a PDF viewer. Use 0 for no scaling down.
1565
+ # Set the DPI of images in PDF. A lower DPI may result in a smaller PDF file. If the specified DPI is higher than the actual image DPI, the original image DPI is retained (no upscaling is performed). Use 0 to leave the images unaltered.
1553
1566
  #
1554
1567
  # * +image_dpi+ - The DPI value. Must be a positive integer number or 0.
1555
1568
  # * *Returns* - The converter object.
@@ -1805,7 +1818,7 @@ module Pdfcrowd
1805
1818
  end
1806
1819
 
1807
1820
  # Get the number of conversion credits available in your account.
1808
- # The number is available after calling the conversion. So use the method after convertXYZ method.
1821
+ # This method can only be called after a call to one of the convertXYZ methods.
1809
1822
  # The returned value can differ from the actual count if you run parallel conversions.
1810
1823
  # The special value 999999 is returned if the information is not available.
1811
1824
  # * *Returns* - The number of credits.
@@ -2248,9 +2261,9 @@ module Pdfcrowd
2248
2261
  self
2249
2262
  end
2250
2263
 
2251
- # Run a custom JavaScript after the document is loaded. The script is intended for post-load DOM manipulation (add/remove elements, update CSS, ...).
2264
+ # 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, ...). The custom JavaScript can use helper functions from our JavaScript library.
2252
2265
  #
2253
- # * +custom_javascript+ - String containing a JavaScript code. The string must not be empty.
2266
+ # * +custom_javascript+ - A string containing a JavaScript code. The string must not be empty.
2254
2267
  # * *Returns* - The converter object.
2255
2268
  def setCustomJavascript(custom_javascript)
2256
2269
  if (!(!custom_javascript.nil? && !custom_javascript.empty?))
@@ -2261,6 +2274,19 @@ module Pdfcrowd
2261
2274
  self
2262
2275
  end
2263
2276
 
2277
+ # Run a custom JavaScript right after the document is loaded. The script is intended for early DOM manipulation. The custom JavaScript can use helper functions from our JavaScript library.
2278
+ #
2279
+ # * +on_load_javascript+ - A string containing a JavaScript code. The string must not be empty.
2280
+ # * *Returns* - The converter object.
2281
+ def setOnLoadJavascript(on_load_javascript)
2282
+ if (!(!on_load_javascript.nil? && !on_load_javascript.empty?))
2283
+ raise Error.new(Pdfcrowd.create_invalid_value_message(on_load_javascript, "on_load_javascript", "html-to-image", "The string must not be empty.", "set_on_load_javascript"), 470);
2284
+ end
2285
+
2286
+ @fields['on_load_javascript'] = on_load_javascript
2287
+ self
2288
+ end
2289
+
2264
2290
  # Set a custom HTTP header that is sent in Pdfcrowd HTTP requests.
2265
2291
  #
2266
2292
  # * +custom_http_header+ - A string containing the header name and value separated by a colon.
@@ -2368,7 +2394,7 @@ module Pdfcrowd
2368
2394
  end
2369
2395
 
2370
2396
  # Get the number of conversion credits available in your account.
2371
- # The number is available after calling the conversion. So use the method after convertXYZ method.
2397
+ # This method can only be called after a call to one of the convertXYZ methods.
2372
2398
  # The returned value can differ from the actual count if you run parallel conversions.
2373
2399
  # The special value 999999 is returned if the information is not available.
2374
2400
  # * *Returns* - The number of credits.
@@ -2686,7 +2712,7 @@ module Pdfcrowd
2686
2712
  end
2687
2713
 
2688
2714
  # Get the number of conversion credits available in your account.
2689
- # The number is available after calling the conversion. So use the method after convertXYZ method.
2715
+ # This method can only be called after a call to one of the convertXYZ methods.
2690
2716
  # The returned value can differ from the actual count if you run parallel conversions.
2691
2717
  # The special value 999999 is returned if the information is not available.
2692
2718
  # * *Returns* - The number of credits.
@@ -2888,7 +2914,7 @@ module Pdfcrowd
2888
2914
  end
2889
2915
 
2890
2916
  # Get the number of conversion credits available in your account.
2891
- # The number is available after calling the conversion. So use the method after convertXYZ method.
2917
+ # This method can only be called after a call to one of the convertXYZ methods.
2892
2918
  # The returned value can differ from the actual count if you run parallel conversions.
2893
2919
  # The special value 999999 is returned if the information is not available.
2894
2920
  # * *Returns* - The number of credits.
@@ -3151,7 +3177,7 @@ module Pdfcrowd
3151
3177
  end
3152
3178
 
3153
3179
  # Get the number of conversion credits available in your account.
3154
- # The number is available after calling the conversion. So use the method after convertXYZ method.
3180
+ # This method can only be called after a call to one of the convertXYZ methods.
3155
3181
  # The returned value can differ from the actual count if you run parallel conversions.
3156
3182
  # The special value 999999 is returned if the information is not available.
3157
3183
  # * *Returns* - The number of credits.
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.2
4
+ version: 4.5.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-01-30 00:00:00.000000000 Z
11
+ date: 2019-02-27 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.