@iqx-limited/quick-pdf 1.0.21 → 1.1.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 (2) hide show
  1. package/README.md +6 -5
  2. package/package.json +7 -11
package/README.md CHANGED
@@ -89,20 +89,21 @@ img2pdf(input: Buffer | string | URL, options: Options = {})
89
89
 
90
90
  ### Function Signature:
91
91
  ```typescript
92
- pdf2img(input: Buffer | string | URL, options: Options = {})
92
+ pdf2img(input: string | URL, options: Options = {})
93
93
  ```
94
94
 
95
+ If no pdf pages are detected in the input, an empty pages array is returned.
96
+
95
97
  ### Parameters:
96
98
 
97
99
  | Parameter | Type | Description | Data that can be passed |
98
100
  |-----------|---------------------------|--------------------------------------------------|--------------------------------------------|
99
- | `input` | `Buffer \| string \| URL` | The PDF content to convert to images. | A Buffer, file path, or URL pointing to a PDF. String or URL object can be passed for an HTTP or Local Path. |
101
+ | `input` | `string \| URL` | The PDF content to convert to images. | A Buffer, file path, or URL pointing to a PDF. String or URL object can be passed for an HTTP or Local Path. |
100
102
  | `options` | `Options` | Optional configuration for the image conversion. | An object with optional scale, password, and buffer configuration |
101
103
 
102
104
  ### Options Type:
103
105
 
104
106
  | Property | Type | Description |
105
107
  |-----------|----------------------------------------------------------------------|--------------------------------------------------|
106
- | `scale` | `number` | Scaling factor for rendering the PDF pages. Default is 1. |
107
- | `password`| `string` | Optional password for decrypting password-protected PDFs. |
108
- | `mime` | `string` | The mime type to output - "image/png" | "image/jpeg". Default is "image/png". |
108
+ | `quality` | `number` | Quality of image for jpg. Default is 100. |
109
+ | `type` | `string` | The mime type to output - "png" | "jpg". Default is "png". |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iqx-limited/quick-pdf",
3
- "version": "1.0.21",
3
+ "version": "1.1.0",
4
4
  "author": "IQX",
5
5
  "description": "Converting PDFs to images (📃 to 📸)",
6
6
  "type": "module",
@@ -34,25 +34,21 @@
34
34
  },
35
35
  "engineStrict": true,
36
36
  "dependencies": {
37
- "@napi-rs/canvas": "^0.1.62",
38
37
  "file-type": "^19.6.0",
39
- "html-validate": "^8.25.0",
38
+ "html-validate": "^8.26.0",
40
39
  "image-size": "^1.1.1",
41
40
  "path2d-polyfill": "^3.1.3",
42
- "pdfjs-dist": "^4.8.69",
43
41
  "pdfkit": "^0.15.1",
44
42
  "playwright": "^1.49.0",
45
- "semver": "^7.6.3",
46
- "sharp": "^0.33.5"
43
+ "semver": "^7.6.3"
47
44
  },
48
45
  "devDependencies": {
49
46
  "@stylistic/eslint-plugin": "^2.11.0",
50
- "@types/node": "^22.9.0",
51
- "@types/pdfjs-dist": "2.10.377",
52
- "@types/pdfkit": "^0.13.5",
47
+ "@types/node": "^22.10.1",
48
+ "@types/pdfkit": "^0.13.6",
53
49
  "@types/semver": "^7.5.8",
54
50
  "eslint": "^9.15.0",
55
- "typescript": "^5.6.3",
56
- "typescript-eslint": "^8.15.0"
51
+ "typescript": "^5.7.2",
52
+ "typescript-eslint": "^8.16.0"
57
53
  }
58
54
  }