node-pdf2img-native 1.1.5 → 1.1.7
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 +14 -0
- package/libpdfium-darwin-arm64.dylib +0 -0
- package/package.json +8 -5
- package/pdf-renderer.darwin-arm64.node +0 -0
- package/pdf-renderer.darwin-x64.node +0 -0
- package/pdf-renderer.linux-x64-gnu.node +0 -0
- package/pdf-renderer.win32-x64-msvc.node +0 -0
- package/pdfium-win32-x64.dll +0 -0
- /package/{libpdfium.dylib → libpdfium-darwin-x64.dylib} +0 -0
- /package/{libpdfium.so → libpdfium-linux-x64.so} +0 -0
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.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "High-performance PDF to image native renderer using PDFium and NAPI-RS",
|
|
5
|
-
"main": "
|
|
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.
|
|
27
|
-
"
|
|
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
|