pdfcrowd 6.3.0 → 6.4.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfcrowd.rb +110 -20
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb78c2198c168547bbcf1e7cdecbca1083555ba1212ff0f82eeb6a28b37654b0
4
- data.tar.gz: a1581f3fed1e17910a184815fb614c0280a77ba4ecaca0b3d8370a3104675ecf
3
+ metadata.gz: 322ea060c4e7f8e1bd32b97615425c8de400ac4057bb69f773e7f2e77d5c90f8
4
+ data.tar.gz: 676b0bf43dd8b01c6425b21b6dcdde8deaa6126402c46dece2c1e31c89c81700
5
5
  SHA512:
6
- metadata.gz: 9741cb9286efa9fadec0134f16b4bae4107e783772c54dd8641c0a56964fb744ae8bb243b75eaaace888e3abe4bc2de21203db6cf867458b61147517b9f1b730
7
- data.tar.gz: 699a3cc4694d244c1b9f1ebc949a9047eef7e7c1fac6a7e797eb489951f0c98c672c7a3a0adf5e5b01916075b17753a430d95eeefd72c41189ec38d24b6e06e3
6
+ metadata.gz: bfce44ae31033323da751fa12b6dd5eeeece773938a63e398c20fcf220a02777846195df66e43c146de2c2f8127e33dc94f944f7b54d8905ae2e664f5de9fc54
7
+ data.tar.gz: 0aec6354e8bf6960a6d7d7fe897c6d43d727e71592beb977f33f07cbe163ab386044ed4c554d03efb543a99222779ecd3f945eb82297aaea972a41ccb4ffeed9
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 = '6.3.0'
533
+ CLIENT_VERSION = '6.4.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/6.3.0 (https://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/6.4.0 (https://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  @converter_version = '24.04'
@@ -1512,19 +1512,13 @@ module Pdfcrowd
1512
1512
  self
1513
1513
  end
1514
1514
 
1515
- # Set the HTTP authentication user name.
1516
- #
1517
- # * +user_name+ - The user name.
1518
- # * *Returns* - The converter object.
1515
+
1519
1516
  def setHttpAuthUserName(user_name)
1520
1517
  @fields['http_auth_user_name'] = user_name
1521
1518
  self
1522
1519
  end
1523
1520
 
1524
- # Set the HTTP authentication password.
1525
- #
1526
- # * +password+ - The password.
1527
- # * *Returns* - The converter object.
1521
+
1528
1522
  def setHttpAuthPassword(password)
1529
1523
  @fields['http_auth_password'] = password
1530
1524
  self
@@ -2426,7 +2420,7 @@ module Pdfcrowd
2426
2420
  self
2427
2421
  end
2428
2422
 
2429
- # Allows to configure conversion via JSON. The configuration defines various page settings for individual PDF pages or ranges of pages. It provides flexibility in designing each page of the PDF, giving control over each page's size, header, footer etc. If a page or parameter is not explicitly specified, the system will use the default settings for that page or attribute. If a JSON configuration is provided, the settings in the JSON will take precedence over the global options. The structure of the JSON must be: pageSetup: An array of objects where each object defines the configuration for a specific page or range of pages. The following properties can be set for each page object: pages: A comma-separated list of page numbers or ranges. Special strings may be used, such as `odd`, `even` and `last`. For example: 1-: from page 1 to the end of the document 2: only the 2nd page 2,4,6: pages 2, 4, and 6 2-5: pages 2 through 5 odd,2: the 2nd page and all odd pages pageSize: The page size (optional). Possible values: A0, A1, A2, A3, A4, A5, A6, Letter. pageWidth: The width of the page (optional). pageHeight: The height of the page (optional). marginLeft: Left margin (optional). marginRight: Right margin (optional). marginTop: Top margin (optional). marginBottom: Bottom margin (optional). displayHeader: Header appearance (optional). Possible values: none: completely excluded space: only the content is excluded, the space is used content: the content is printed (default) displayFooter: Footer appearance (optional). Possible values: none: completely excluded space: only the content is excluded, the space is used content: the content is printed (default) headerHeight: Height of the header (optional). footerHeight: Height of the footer (optional). orientation: Page orientation, such as "portrait" or "landscape" (optional). Dimensions may be empty, 0 or specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2423
+ # Allows to configure conversion via JSON. The configuration defines various page settings for individual PDF pages or ranges of pages. It provides flexibility in designing each page of the PDF, giving control over each page's size, header, footer etc. If a page or parameter is not explicitly specified, the system will use the default settings for that page or attribute. If a JSON configuration is provided, the settings in the JSON will take precedence over the global options. The structure of the JSON must be: pageSetup: An array of objects where each object defines the configuration for a specific page or range of pages. The following properties can be set for each page object: pages: A comma-separated list of page numbers or ranges. Special strings may be used, such as `odd`, `even` and `last`. For example: 1-: from page 1 to the end of the document 2: only the 2nd page 2,4,6: pages 2, 4, and 6 2-5: pages 2 through 5 odd,2: the 2nd page and all odd pages pageSize: The page size (optional). Possible values: A0, A1, A2, A3, A4, A5, A6, Letter. pageWidth: The width of the page (optional). pageHeight: The height of the page (optional). marginLeft: Left margin (optional). marginRight: Right margin (optional). marginTop: Top margin (optional). marginBottom: Bottom margin (optional). displayHeader: Header appearance (optional). Possible values: none: completely excluded space: only the content is excluded, the space is used content: the content is printed (default) displayFooter: Footer appearance (optional). Possible values: none: completely excluded space: only the content is excluded, the space is used content: the content is printed (default) headerHeight: Height of the header (optional). footerHeight: Height of the footer (optional). orientation: Page orientation, such as "portrait" or "landscape" (optional). backgroundColor: Page background color in RRGGBB or RRGGBBAA hexadecimal format (optional). Dimensions may be empty, 0 or specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2430
2424
  #
2431
2425
  # * +json_string+ - The JSON string.
2432
2426
  # * *Returns* - The converter object.
@@ -2448,6 +2442,21 @@ module Pdfcrowd
2448
2442
  self
2449
2443
  end
2450
2444
 
2445
+
2446
+ def setSubprocessReferrer(referrer)
2447
+ @fields['subprocess_referrer'] = referrer
2448
+ self
2449
+ end
2450
+
2451
+ # Specifies the User-Agent HTTP header that will be used by the converter when a request is made to the converted web page.
2452
+ #
2453
+ # * +agent+ - The user agent.
2454
+ # * *Returns* - The converter object.
2455
+ def setConverterUserAgent(agent)
2456
+ @fields['converter_user_agent'] = agent
2457
+ self
2458
+ end
2459
+
2451
2460
  # Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case.
2452
2461
  #
2453
2462
  # * +version+ - The version identifier. Allowed values are 24.04, 20.10, 18.10, latest.
@@ -2471,6 +2480,15 @@ module Pdfcrowd
2471
2480
  self
2472
2481
  end
2473
2482
 
2483
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
2484
+ #
2485
+ # * +agent+ - The user agent string.
2486
+ # * *Returns* - The converter object.
2487
+ def setClientUserAgent(agent)
2488
+ @helper.setUserAgent(agent)
2489
+ self
2490
+ end
2491
+
2474
2492
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
2475
2493
  #
2476
2494
  # * +agent+ - The user agent string.
@@ -2864,19 +2882,13 @@ module Pdfcrowd
2864
2882
  self
2865
2883
  end
2866
2884
 
2867
- # Set the HTTP authentication user name.
2868
- #
2869
- # * +user_name+ - The user name.
2870
- # * *Returns* - The converter object.
2885
+
2871
2886
  def setHttpAuthUserName(user_name)
2872
2887
  @fields['http_auth_user_name'] = user_name
2873
2888
  self
2874
2889
  end
2875
2890
 
2876
- # Set the HTTP authentication password.
2877
- #
2878
- # * +password+ - The password.
2879
- # * *Returns* - The converter object.
2891
+
2880
2892
  def setHttpAuthPassword(password)
2881
2893
  @fields['http_auth_password'] = password
2882
2894
  self
@@ -3258,6 +3270,21 @@ module Pdfcrowd
3258
3270
  self
3259
3271
  end
3260
3272
 
3273
+
3274
+ def setSubprocessReferrer(referrer)
3275
+ @fields['subprocess_referrer'] = referrer
3276
+ self
3277
+ end
3278
+
3279
+ # Specifies the User-Agent HTTP header that will be used by the converter when a request is made to the converted web page.
3280
+ #
3281
+ # * +agent+ - The user agent.
3282
+ # * *Returns* - The converter object.
3283
+ def setConverterUserAgent(agent)
3284
+ @fields['converter_user_agent'] = agent
3285
+ self
3286
+ end
3287
+
3261
3288
  # Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case.
3262
3289
  #
3263
3290
  # * +version+ - The version identifier. Allowed values are 24.04, 20.10, 18.10, latest.
@@ -3281,6 +3308,15 @@ module Pdfcrowd
3281
3308
  self
3282
3309
  end
3283
3310
 
3311
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
3312
+ #
3313
+ # * +agent+ - The user agent string.
3314
+ # * *Returns* - The converter object.
3315
+ def setClientUserAgent(agent)
3316
+ @helper.setUserAgent(agent)
3317
+ self
3318
+ end
3319
+
3284
3320
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
3285
3321
  #
3286
3322
  # * +agent+ - The user agent string.
@@ -3889,6 +3925,15 @@ module Pdfcrowd
3889
3925
  self
3890
3926
  end
3891
3927
 
3928
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
3929
+ #
3930
+ # * +agent+ - The user agent string.
3931
+ # * *Returns* - The converter object.
3932
+ def setClientUserAgent(agent)
3933
+ @helper.setUserAgent(agent)
3934
+ self
3935
+ end
3936
+
3892
3937
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
3893
3938
  #
3894
3939
  # * +agent+ - The user agent string.
@@ -4457,6 +4502,15 @@ module Pdfcrowd
4457
4502
  self
4458
4503
  end
4459
4504
 
4505
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
4506
+ #
4507
+ # * +agent+ - The user agent string.
4508
+ # * *Returns* - The converter object.
4509
+ def setClientUserAgent(agent)
4510
+ @helper.setUserAgent(agent)
4511
+ self
4512
+ end
4513
+
4460
4514
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
4461
4515
  #
4462
4516
  # * +agent+ - The user agent string.
@@ -5374,6 +5428,15 @@ module Pdfcrowd
5374
5428
  self
5375
5429
  end
5376
5430
 
5431
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
5432
+ #
5433
+ # * +agent+ - The user agent string.
5434
+ # * *Returns* - The converter object.
5435
+ def setClientUserAgent(agent)
5436
+ @helper.setUserAgent(agent)
5437
+ self
5438
+ end
5439
+
5377
5440
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
5378
5441
  #
5379
5442
  # * +agent+ - The user agent string.
@@ -5738,7 +5801,7 @@ module Pdfcrowd
5738
5801
  self
5739
5802
  end
5740
5803
 
5741
- # Add a specified prefix to all id and class attributes in the HTML content, creating a namespace for safe integration into another HTML document. This process ensures unique identifiers, preventing conflicts when merging with other HTML.
5804
+ # Add the specified prefix to all id and class attributes in the HTML content, creating a namespace for safe integration into another HTML document. This ensures unique identifiers, preventing conflicts when merging with other HTML.
5742
5805
  #
5743
5806
  # * +prefix+ - The prefix to add before each id and class attribute name. Start with a letter or underscore, and use only letters, numbers, hyphens, underscores, or colons.
5744
5807
  # * *Returns* - The converter object.
@@ -5914,6 +5977,15 @@ module Pdfcrowd
5914
5977
  self
5915
5978
  end
5916
5979
 
5980
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
5981
+ #
5982
+ # * +agent+ - The user agent string.
5983
+ # * *Returns* - The converter object.
5984
+ def setClientUserAgent(agent)
5985
+ @helper.setUserAgent(agent)
5986
+ self
5987
+ end
5988
+
5917
5989
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
5918
5990
  #
5919
5991
  # * +agent+ - The user agent string.
@@ -6413,6 +6485,15 @@ module Pdfcrowd
6413
6485
  self
6414
6486
  end
6415
6487
 
6488
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
6489
+ #
6490
+ # * +agent+ - The user agent string.
6491
+ # * *Returns* - The converter object.
6492
+ def setClientUserAgent(agent)
6493
+ @helper.setUserAgent(agent)
6494
+ self
6495
+ end
6496
+
6416
6497
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
6417
6498
  #
6418
6499
  # * +agent+ - The user agent string.
@@ -6873,6 +6954,15 @@ module Pdfcrowd
6873
6954
  self
6874
6955
  end
6875
6956
 
6957
+ # Specifies the User-Agent HTTP header that the client library will use when interacting with the API.
6958
+ #
6959
+ # * +agent+ - The user agent string.
6960
+ # * *Returns* - The converter object.
6961
+ def setClientUserAgent(agent)
6962
+ @helper.setUserAgent(agent)
6963
+ self
6964
+ end
6965
+
6876
6966
  # Set a custom user agent HTTP header. It can be useful if you are behind a proxy or a firewall.
6877
6967
  #
6878
6968
  # * +agent+ - The user agent string.
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: 6.3.0
4
+ version: 6.4.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: 2024-11-06 00:00:00.000000000 Z
11
+ date: 2024-11-29 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.