@jackgreen2018/pdf-engine 1.0.16 → 1.0.18

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/README.md CHANGED
@@ -114,14 +114,14 @@ npm run benchmark
114
114
 
115
115
  | Operation | pdf-engine (ms) | pdf-lib (ms) |
116
116
  |-----------|-----------------|--------------|
117
- | Page Count | 0.77 | 1.40 |
118
- | Text Extraction | 0.22 | — |
119
- | Merge (2 files) | 1.07 | 3.65 |
120
- | Split (pages [0,1]) | 0.20 | 1.80 |
117
+ | Page Count | 0.82 | 1.53 |
118
+ | Text Extraction | 0.25 | — |
119
+ | Merge (2 files) | 0.88 | 4.27 |
120
+ | Split (pages [0,1]) | 0.28 | 1.96 |
121
121
 
122
122
  *extractText correctness: PASS — gated via `tests/fixtures/text-fixture.pdf` (FlateDecode-compressed, real-world content stream)*
123
123
 
124
- *Run 2026-07-31; full stdout at evidence/benchmark-output.log.*
124
+ *Run 2026-07-31 (v1.0.17); full stdout at evidence/benchmark-stdout.txt.*
125
125
 
126
126
  ## Commercial license & support
127
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jackgreen2018/pdf-engine",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,18 @@
34
34
  "typescript": "^7.0.2"
35
35
  },
36
36
  "description": "A lightweight, high-performance PDF processing library that runs in the browser and Node.js via Rust/WASM. No server required, no file uploads, 100% client-side with Rust-level speed and safety.",
37
- "keywords": ["pdf", "wasm", "rust", "pdf-merge", "pdf-split", "pdf-parser", "extract-text", "browser", "node", "no-server"],
37
+ "keywords": [
38
+ "pdf",
39
+ "wasm",
40
+ "rust",
41
+ "pdf-merge",
42
+ "pdf-split",
43
+ "pdf-parser",
44
+ "extract-text",
45
+ "browser",
46
+ "node",
47
+ "no-server"
48
+ ],
38
49
  "author": "",
39
50
  "bugs": {
40
51
  "url": "https://github.com/jackgreen/pdf-engine/issues"
package/pkg/README.md CHANGED
@@ -114,14 +114,14 @@ npm run benchmark
114
114
 
115
115
  | Operation | pdf-engine (ms) | pdf-lib (ms) |
116
116
  |-----------|-----------------|--------------|
117
- | Page Count | 0.77 | 1.40 |
118
- | Text Extraction | 0.22 | — |
119
- | Merge (2 files) | 1.07 | 3.65 |
120
- | Split (pages [0,1]) | 0.20 | 1.80 |
117
+ | Page Count | 0.82 | 1.53 |
118
+ | Text Extraction | 0.25 | — |
119
+ | Merge (2 files) | 0.88 | 4.27 |
120
+ | Split (pages [0,1]) | 0.28 | 1.96 |
121
121
 
122
122
  *extractText correctness: PASS — gated via `tests/fixtures/text-fixture.pdf` (FlateDecode-compressed, real-world content stream)*
123
123
 
124
- *Run 2026-07-31; full stdout at evidence/benchmark-output.log.*
124
+ *Run 2026-07-31 (v1.0.17); full stdout at evidence/benchmark-stdout.txt.*
125
125
 
126
126
  ## Commercial license & support
127
127
 
package/pkg/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pdf_engine",
3
3
  "type": "module",
4
- "version": "1.0.16",
4
+ "version": "1.0.18",
5
5
  "files": [
6
6
  "pdf_engine_bg.wasm",
7
7
  "pdf_engine.js",
package/src/lib.rs CHANGED
@@ -280,3 +280,15 @@ pub fn get_pdf_info(buffer: &[u8]) -> Result<String, JsValue> {
280
280
  let count = get_page_count(buffer)?;
281
281
  Ok(format!("PDF with {} pages", count))
282
282
  }
283
+
284
+ #[cfg(test)]
285
+ mod tests {
286
+ use super::*;
287
+
288
+ #[test]
289
+ fn page_count_of_empty_doc_is_one() {
290
+ // ponytail: lopdf get_pages() returns empty map for docs with no pages
291
+ let doc = Document::with_version("1.5");
292
+ assert_eq!(doc.get_pages().len().max(1), 1);
293
+ }
294
+ }