pdfcrowd 6.2.1 → 6.3.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 +28 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f97c72508c22bb03da1413d7868420657d6e93fe0447913d93b71c1dc9bfa1fb
4
- data.tar.gz: 3956525e9d2c6ee9c490684fcda82e933e98fca0bbc5d4176df112ef03c8cf1d
3
+ metadata.gz: cb78c2198c168547bbcf1e7cdecbca1083555ba1212ff0f82eeb6a28b37654b0
4
+ data.tar.gz: a1581f3fed1e17910a184815fb614c0280a77ba4ecaca0b3d8370a3104675ecf
5
5
  SHA512:
6
- metadata.gz: f56fbea6b28e21d0f74bde3cb9e33e04cabbb20f38ee4e3a54f46c722f8dba14ed35be040f0c464b7c0649bbac33b896f7d9d4d136d8f45986c821beab727fde
7
- data.tar.gz: 3a50f9412ad1f5236c0ab3d335c50aad84a9f41bf76aef3b9e381c35fd0fb57aac85d62dee9f1056ad2b19f30838d883029e63d69722a57919ecffde75860c22
6
+ metadata.gz: 9741cb9286efa9fadec0134f16b4bae4107e783772c54dd8641c0a56964fb744ae8bb243b75eaaace888e3abe4bc2de21203db6cf867458b61147517b9f1b730
7
+ data.tar.gz: 699a3cc4694d244c1b9f1ebc949a9047eef7e7c1fac6a7e797eb489951f0c98c672c7a3a0adf5e5b01916075b17753a430d95eeefd72c41189ec38d24b6e06e3
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.2.1'
533
+ CLIENT_VERSION = '6.3.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.2.1 (https://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/6.3.0 (https://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  @converter_version = '24.04'
@@ -5738,6 +5738,19 @@ module Pdfcrowd
5738
5738
  self
5739
5739
  end
5740
5740
 
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.
5742
+ #
5743
+ # * +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
+ # * *Returns* - The converter object.
5745
+ def setHtmlNamespace(prefix)
5746
+ unless /(?i)^[a-z_][a-z0-9_:-]*$/.match(prefix)
5747
+ raise Error.new(Pdfcrowd.create_invalid_value_message(prefix, "setHtmlNamespace", "pdf-to-html", "Start with a letter or underscore, and use only letters, numbers, hyphens, underscores, or colons.", "set_html_namespace"), 470);
5748
+ end
5749
+
5750
+ @fields['html_namespace'] = prefix
5751
+ self
5752
+ end
5753
+
5741
5754
  # A helper method to determine if the output file is a zip archive. The output of the conversion may be either an HTML file or a zip file containing the HTML and its external assets.
5742
5755
  # * *Returns* - True if the conversion output is a zip file, otherwise False.
5743
5756
  def isZippedOutput()
@@ -5878,6 +5891,19 @@ module Pdfcrowd
5878
5891
  self
5879
5892
  end
5880
5893
 
5894
+ # Set the converter version. Different versions may produce different output. Choose which one provides the best output for your case.
5895
+ #
5896
+ # * +version+ - The version identifier. Allowed values are 24.04, 20.10, 18.10, latest.
5897
+ # * *Returns* - The converter object.
5898
+ def setConverterVersion(version)
5899
+ unless /(?i)^(24.04|20.10|18.10|latest)$/.match(version)
5900
+ raise Error.new(Pdfcrowd.create_invalid_value_message(version, "setConverterVersion", "pdf-to-html", "Allowed values are 24.04, 20.10, 18.10, latest.", "set_converter_version"), 470);
5901
+ end
5902
+
5903
+ @helper.setConverterVersion(version)
5904
+ self
5905
+ end
5906
+
5881
5907
  # Specifies if the client communicates over HTTP or HTTPS with Pdfcrowd API.
5882
5908
  # Warning: Using HTTP is insecure as data sent over HTTP is not encrypted. Enable this option only if you know what you are doing.
5883
5909
  #
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.2.1
4
+ version: 6.3.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-10-10 00:00:00.000000000 Z
11
+ date: 2024-11-06 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.