@iqx-limited/quick-pdf 1.0.5 → 1.0.6

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 (2) hide show
  1. package/README.md +15 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -28,7 +28,15 @@ html2pdf(input: string | URL)
28
28
  | Parameter | Type | Description | Data that can be passed |
29
29
  |-----------|---------------|--------------------------------------------------|--------------------------------------------|
30
30
  | `input` | `string \| URL` | The HTML content to convert to PDF. | A file path or a URL pointing to HTML content, as either a Node URL object or a Node string. Alternativly pass an html string directly. |
31
- | `base64` | `string?` | Return a base64 encoded string instead of a buffer | Boolean |
31
+ | `options` | `Options` | Optional configuration for the PDF conversion. | An object with optional to configure PDF |
32
+
33
+ ### Options Type:
34
+
35
+ | Property | Type | Description | Default |
36
+ |-----------|----------|--------------------------------------------------|---------|
37
+ | `base64` | `boolean` | PDF should be returned as a base64 encoded string. |false|
38
+ | `rules` | `object` | Optional custom validation rules for HTML content - see https://html-validate.org/rules/ for more details. Default is all standard rules enabled. |''|
39
+ | `scale` | `number` | Scale of the PDF | 1 |
32
40
 
33
41
  ## 2. `img2pdf`
34
42
 
@@ -42,14 +50,15 @@ img2pdf(input: Buffer | string | URL, options: Options = {})
42
50
  | Parameter | Type | Description | Data that can be passed |
43
51
  |-----------|---------------------------|--------------------------------------------------|--------------------------------------------|
44
52
  | `input` | `Buffer \| string \| URL` | The image content to convert to PDF. | A Buffer, file path, or URL pointing to an image. String or URL object can be passed for an HTTP or Local Path. |
45
- | `options` | `Options` | Optional configuration for the PDF conversion. | An object with optional headers and footers |
53
+ | `options` | `Options` | Optional configuration for the PDF conversion. | An object with optional configurations. |
46
54
 
47
55
  ### Options Type:
48
56
 
49
- | Property | Type | Description |
50
- |-----------|----------|--------------------------------------------------|
51
- | `header` | `string` | Optional header text to include in the PDF. |
52
- | `footer` | `string` | Optional footer text to include in the PDF. |
57
+ | Property | Type | Description | Default |
58
+ |-----------|----------|--------------------------------------------------|---------|
59
+ | `header` | `string` | Optional header text to include in the PDF. |undefined|
60
+ | `footer` | `string` | Optional footer text to include in the PDF. |undefined|
61
+ | `fontSize` | `number` | Font Size of the header or footer | 10 |
53
62
 
54
63
  ## 3. `pdf2img`
55
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqx-limited/quick-pdf",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "author": "IQX",
5
5
  "description": "Converting PDFs to images (📃 to 📸)",
6
6
  "type": "module",