node-pdf2img-native 1.1.5 → 1.1.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.
package/lib.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * PDF Renderer 包装模块
3
+ *
4
+ * 在加载原生模块之前设置 PDFIUM_MODULE_DIR 环境变量,
5
+ * 确保 Rust 代码能找到正确架构的 PDFium 动态库。
6
+ */
7
+
8
+ const path = require('path');
9
+
10
+ // 设置模块目录环境变量,供 Rust 代码使用
11
+ process.env.PDFIUM_MODULE_DIR = __dirname;
12
+
13
+ // 加载原生模块
14
+ module.exports = require('./index.js');
Binary file
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "node-pdf2img-native",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "High-performance PDF to image native renderer using PDFium and NAPI-RS",
5
- "main": "index.js",
5
+ "main": "lib.js",
6
6
  "types": "index.d.ts",
7
7
  "napi": {
8
8
  "name": "pdf-renderer",
@@ -19,12 +19,15 @@
19
19
  "binaryName": "pdf-renderer"
20
20
  },
21
21
  "files": [
22
+ "lib.js",
22
23
  "index.js",
23
24
  "index.d.ts",
24
25
  "pdf-renderer.*.node",
25
- "libpdfium.so",
26
- "libpdfium.dylib",
27
- "pdfium.dll"
26
+ "libpdfium-linux-x64.so",
27
+ "libpdfium-linux-arm64.so",
28
+ "libpdfium-darwin-x64.dylib",
29
+ "libpdfium-darwin-arm64.dylib",
30
+ "pdfium-win32-x64.dll"
28
31
  ],
29
32
  "scripts": {
30
33
  "artifacts": "napi artifacts",
Binary file
Binary file
Binary file
Binary file
Binary file
File without changes
File without changes