@f-o-t/pdf 0.3.10 → 0.4.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.
package/README.md CHANGED
@@ -32,6 +32,17 @@ import { createLexer, createParser, createReader } from "@f-o-t/pdf/plugins/pars
32
32
 
33
33
  Load existing PDFs, modify them, and save with incremental updates. Also supports creating signature placeholders for digital signing workflows.
34
34
 
35
+ #### `countPdfPages(data: Uint8Array): number`
36
+
37
+ Count the number of pages in a PDF without fully loading it for editing.
38
+
39
+ ```ts
40
+ import { countPdfPages } from "@f-o-t/pdf";
41
+ // or: import { countPdfPages } from "@f-o-t/pdf/plugins/editing";
42
+
43
+ const pages = countPdfPages(pdfBytes);
44
+ ```
45
+
35
46
  #### `loadPdf(data: Uint8Array): PdfDocument`
36
47
 
37
48
  Load an existing PDF for editing. Returns a `PdfDocument` that can be modified and saved.