pdfcrowd 6.0.0 → 6.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pdfcrowd.rb +82 -82
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34762c61f54d6cc17ab834a37ad6cc4e8e3849b29bfcc432b493ea0fb97bb5b5
4
- data.tar.gz: 6def76bbb1426182fbd92d45b13148f01785190eb58a6c3dd6cbe726ab16d162
3
+ metadata.gz: bd5433b839fb55dd482f13ea76bf6e74d203c071f748fd5d6ee8e09150a25f59
4
+ data.tar.gz: d55b65b1bdcd54cc604eb2176e950dad8d8ce1b876414f37da5f2819724d892b
5
5
  SHA512:
6
- metadata.gz: d43f03b05750ecee2d0b4843d8cdee07d522c38be060431dfc5da8a89149d3d838711b3fb034fbaaa7612d813d49681853b7acf10b951050b4d441c7f17e1080
7
- data.tar.gz: 60377a449017ce359cc8d4de32d3fe2f200042aafc481a1d2ce04c6c667126517c330cc0b06261e847f91ddba31498f704a57caab642018406e2b1061116f0c9
6
+ metadata.gz: 042b5798eb2361402cae04bfc61b465657e608c7d5b09a576123442a77e8da70af92cd4c4c39cf1d0ab33684093f8ac5bc5a4353944e7fe1452a78be6801ae46
7
+ data.tar.gz: d27d21a7ff8446ee0d3388e21feb37eaf73c647460ecb567e22c3843c41c684b90ede884a8440034c7804d11f205caf5c1745b42e9305f21261480ea7a90bc38
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.0.0'
533
+ CLIENT_VERSION = '6.0.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/6.0.0 (https://pdfcrowd.com)')
544
+ setUserAgent('pdfcrowd_ruby_client/6.0.1 (https://pdfcrowd.com)')
545
545
 
546
546
  @retry_count = 1
547
547
  @converter_version = '24.04'
@@ -1144,86 +1144,6 @@ module Pdfcrowd
1144
1144
  self
1145
1145
  end
1146
1146
 
1147
- # Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area.
1148
- #
1149
- # * +x+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
1150
- # * *Returns* - The converter object.
1151
- def setContentAreaX(x)
1152
- unless /(?i)^0$|^\-?[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(x)
1153
- raise Error.new(Pdfcrowd.create_invalid_value_message(x, "setContentAreaX", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\". It may contain a negative value.", "set_content_area_x"), 470);
1154
- end
1155
-
1156
- @fields['content_area_x'] = x
1157
- self
1158
- end
1159
-
1160
- # Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area.
1161
- #
1162
- # * +y+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
1163
- # * *Returns* - The converter object.
1164
- def setContentAreaY(y)
1165
- unless /(?i)^0$|^\-?[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(y)
1166
- raise Error.new(Pdfcrowd.create_invalid_value_message(y, "setContentAreaY", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\". It may contain a negative value.", "set_content_area_y"), 470);
1167
- end
1168
-
1169
- @fields['content_area_y'] = y
1170
- self
1171
- end
1172
-
1173
- # Set the width of the content area. It should be at least 1 inch.
1174
- #
1175
- # * +width+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
1176
- # * *Returns* - The converter object.
1177
- def setContentAreaWidth(width)
1178
- unless /(?i)^0$|^[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(width)
1179
- raise Error.new(Pdfcrowd.create_invalid_value_message(width, "setContentAreaWidth", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\".", "set_content_area_width"), 470);
1180
- end
1181
-
1182
- @fields['content_area_width'] = width
1183
- self
1184
- end
1185
-
1186
- # Set the height of the content area. It should be at least 1 inch.
1187
- #
1188
- # * +height+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
1189
- # * *Returns* - The converter object.
1190
- def setContentAreaHeight(height)
1191
- unless /(?i)^0$|^[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(height)
1192
- raise Error.new(Pdfcrowd.create_invalid_value_message(height, "setContentAreaHeight", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\".", "set_content_area_height"), 470);
1193
- end
1194
-
1195
- @fields['content_area_height'] = height
1196
- self
1197
- end
1198
-
1199
- # Set the content area position and size. The content area enables to specify a web page area to be converted.
1200
- #
1201
- # * +x+ - Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
1202
- # * +y+ - Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
1203
- # * +width+ - Set the width of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
1204
- # * +height+ - Set the height of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
1205
- # * *Returns* - The converter object.
1206
- def setContentArea(x, y, width, height)
1207
- setContentAreaX(x)
1208
- setContentAreaY(y)
1209
- setContentAreaWidth(width)
1210
- setContentAreaHeight(height)
1211
- self
1212
- end
1213
-
1214
- # Specifies behavior in presence of CSS @page rules. It may affect the page size, margins and orientation.
1215
- #
1216
- # * +mode+ - The page rule mode. Allowed values are default, mode1, mode2.
1217
- # * *Returns* - The converter object.
1218
- def setCssPageRuleMode(mode)
1219
- unless /(?i)^(default|mode1|mode2)$/.match(mode)
1220
- raise Error.new(Pdfcrowd.create_invalid_value_message(mode, "setCssPageRuleMode", "html-to-pdf", "Allowed values are default, mode1, mode2.", "set_css_page_rule_mode"), 470);
1221
- end
1222
-
1223
- @fields['css_page_rule_mode'] = mode
1224
- self
1225
- end
1226
-
1227
1147
  # Specifies which blank pages to exclude from the output document.
1228
1148
  #
1229
1149
  # * +pages+ - The empty page behavior. Allowed values are trailing, all, none.
@@ -1666,6 +1586,19 @@ module Pdfcrowd
1666
1586
  self
1667
1587
  end
1668
1588
 
1589
+ # Specifies behavior in presence of CSS @page rules. It may affect the page size, margins and orientation.
1590
+ #
1591
+ # * +mode+ - The page rule mode. Allowed values are default, mode1, mode2.
1592
+ # * *Returns* - The converter object.
1593
+ def setCssPageRuleMode(mode)
1594
+ unless /(?i)^(default|mode1|mode2)$/.match(mode)
1595
+ raise Error.new(Pdfcrowd.create_invalid_value_message(mode, "setCssPageRuleMode", "html-to-pdf", "Allowed values are default, mode1, mode2.", "set_css_page_rule_mode"), 470);
1596
+ end
1597
+
1598
+ @fields['css_page_rule_mode'] = mode
1599
+ self
1600
+ end
1601
+
1669
1602
  # Apply custom CSS to the input HTML document. It allows you to modify the visual appearance and layout of your HTML content dynamically. Tip: Using !important in custom CSS provides a way to prioritize and override conflicting styles.
1670
1603
  #
1671
1604
  # * +css+ - A string containing valid CSS. The string must not be empty.
@@ -2358,6 +2291,73 @@ module Pdfcrowd
2358
2291
  self
2359
2292
  end
2360
2293
 
2294
+ # Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area.
2295
+ #
2296
+ # * +x+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
2297
+ # * *Returns* - The converter object.
2298
+ def setContentAreaX(x)
2299
+ unless /(?i)^0$|^\-?[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(x)
2300
+ raise Error.new(Pdfcrowd.create_invalid_value_message(x, "setContentAreaX", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\". It may contain a negative value.", "set_content_area_x"), 470);
2301
+ end
2302
+
2303
+ @fields['content_area_x'] = x
2304
+ self
2305
+ end
2306
+
2307
+ # Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area.
2308
+ #
2309
+ # * +y+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
2310
+ # * *Returns* - The converter object.
2311
+ def setContentAreaY(y)
2312
+ unless /(?i)^0$|^\-?[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(y)
2313
+ raise Error.new(Pdfcrowd.create_invalid_value_message(y, "setContentAreaY", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\". It may contain a negative value.", "set_content_area_y"), 470);
2314
+ end
2315
+
2316
+ @fields['content_area_y'] = y
2317
+ self
2318
+ end
2319
+
2320
+ # Set the width of the content area. It should be at least 1 inch.
2321
+ #
2322
+ # * +width+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2323
+ # * *Returns* - The converter object.
2324
+ def setContentAreaWidth(width)
2325
+ unless /(?i)^0$|^[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(width)
2326
+ raise Error.new(Pdfcrowd.create_invalid_value_message(width, "setContentAreaWidth", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\".", "set_content_area_width"), 470);
2327
+ end
2328
+
2329
+ @fields['content_area_width'] = width
2330
+ self
2331
+ end
2332
+
2333
+ # Set the height of the content area. It should be at least 1 inch.
2334
+ #
2335
+ # * +height+ - The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2336
+ # * *Returns* - The converter object.
2337
+ def setContentAreaHeight(height)
2338
+ unless /(?i)^0$|^[0-9]*\.?[0-9]+(pt|px|mm|cm|in)$/.match(height)
2339
+ raise Error.new(Pdfcrowd.create_invalid_value_message(height, "setContentAreaHeight", "html-to-pdf", "The value must be specified in inches \"in\", millimeters \"mm\", centimeters \"cm\", pixels \"px\", or points \"pt\".", "set_content_area_height"), 470);
2340
+ end
2341
+
2342
+ @fields['content_area_height'] = height
2343
+ self
2344
+ end
2345
+
2346
+ # Set the content area position and size. The content area enables to specify a web page area to be converted.
2347
+ #
2348
+ # * +x+ - Set the top left X coordinate of the content area. It is relative to the top left X coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
2349
+ # * +y+ - Set the top left Y coordinate of the content area. It is relative to the top left Y coordinate of the print area. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt". It may contain a negative value.
2350
+ # * +width+ - Set the width of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2351
+ # * +height+ - Set the height of the content area. It should be at least 1 inch. The value must be specified in inches "in", millimeters "mm", centimeters "cm", pixels "px", or points "pt".
2352
+ # * *Returns* - The converter object.
2353
+ def setContentArea(x, y, width, height)
2354
+ setContentAreaX(x)
2355
+ setContentAreaY(y)
2356
+ setContentAreaWidth(width)
2357
+ setContentAreaHeight(height)
2358
+ self
2359
+ end
2360
+
2361
2361
  # A 2D transformation matrix applied to the main contents on each page. The origin [0,0] is located at the top-left corner of the contents. The resolution is 72 dpi.
2362
2362
  #
2363
2363
  # * +matrix+ - A comma separated string of matrix elements: "scaleX,skewX,transX,skewY,scaleY,transY"
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.0.0
4
+ version: 6.0.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: 2024-07-01 00:00:00.000000000 Z
11
+ date: 2024-07-09 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.