@lexmata/micropdf 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/LICENSE +191 -0
- package/README.md +985 -0
- package/binding.gyp +73 -0
- package/dist/annot.d.ts +458 -0
- package/dist/annot.d.ts.map +1 -0
- package/dist/annot.js +697 -0
- package/dist/annot.js.map +1 -0
- package/dist/archive.d.ts +128 -0
- package/dist/archive.d.ts.map +1 -0
- package/dist/archive.js +268 -0
- package/dist/archive.js.map +1 -0
- package/dist/buffer.d.ts +572 -0
- package/dist/buffer.d.ts.map +1 -0
- package/dist/buffer.js +971 -0
- package/dist/buffer.js.map +1 -0
- package/dist/colorspace.d.ts +287 -0
- package/dist/colorspace.d.ts.map +1 -0
- package/dist/colorspace.js +542 -0
- package/dist/colorspace.js.map +1 -0
- package/dist/context.d.ts +184 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +320 -0
- package/dist/context.js.map +1 -0
- package/dist/cookie.d.ts +164 -0
- package/dist/cookie.d.ts.map +1 -0
- package/dist/cookie.js +306 -0
- package/dist/cookie.js.map +1 -0
- package/dist/device.d.ts +169 -0
- package/dist/device.d.ts.map +1 -0
- package/dist/device.js +350 -0
- package/dist/device.js.map +1 -0
- package/dist/display-list.d.ts +202 -0
- package/dist/display-list.d.ts.map +1 -0
- package/dist/display-list.js +410 -0
- package/dist/display-list.js.map +1 -0
- package/dist/document.d.ts +637 -0
- package/dist/document.d.ts.map +1 -0
- package/dist/document.js +902 -0
- package/dist/document.js.map +1 -0
- package/dist/easy.d.ts +423 -0
- package/dist/easy.d.ts.map +1 -0
- package/dist/easy.js +644 -0
- package/dist/easy.js.map +1 -0
- package/dist/enhanced.d.ts +226 -0
- package/dist/enhanced.d.ts.map +1 -0
- package/dist/enhanced.js +368 -0
- package/dist/enhanced.js.map +1 -0
- package/dist/filter.d.ts +51 -0
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.js +381 -0
- package/dist/filter.js.map +1 -0
- package/dist/font.d.ts +222 -0
- package/dist/font.d.ts.map +1 -0
- package/dist/font.js +381 -0
- package/dist/font.js.map +1 -0
- package/dist/form.d.ts +214 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +497 -0
- package/dist/form.js.map +1 -0
- package/dist/geometry.d.ts +469 -0
- package/dist/geometry.d.ts.map +1 -0
- package/dist/geometry.js +780 -0
- package/dist/geometry.js.map +1 -0
- package/dist/image.d.ts +172 -0
- package/dist/image.d.ts.map +1 -0
- package/dist/image.js +348 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +171 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +339 -0
- package/dist/index.js.map +1 -0
- package/dist/link.d.ts +168 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +343 -0
- package/dist/link.js.map +1 -0
- package/dist/micropdf.d.ts +40 -0
- package/dist/micropdf.d.ts.map +1 -0
- package/dist/micropdf.js +45 -0
- package/dist/micropdf.js.map +1 -0
- package/dist/nanopdf.d.ts +40 -0
- package/dist/nanopdf.d.ts.map +1 -0
- package/dist/nanopdf.js +45 -0
- package/dist/nanopdf.js.map +1 -0
- package/dist/native.d.ts +242 -0
- package/dist/native.d.ts.map +1 -0
- package/dist/native.js +509 -0
- package/dist/native.js.map +1 -0
- package/dist/output.d.ts +166 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +365 -0
- package/dist/output.js.map +1 -0
- package/dist/path.d.ts +420 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +687 -0
- package/dist/path.js.map +1 -0
- package/dist/pdf/object.d.ts +489 -0
- package/dist/pdf/object.d.ts.map +1 -0
- package/dist/pdf/object.js +1045 -0
- package/dist/pdf/object.js.map +1 -0
- package/dist/pixmap.d.ts +315 -0
- package/dist/pixmap.d.ts.map +1 -0
- package/dist/pixmap.js +590 -0
- package/dist/pixmap.js.map +1 -0
- package/dist/profiler.d.ts +159 -0
- package/dist/profiler.d.ts.map +1 -0
- package/dist/profiler.js +380 -0
- package/dist/profiler.js.map +1 -0
- package/dist/render-options.d.ts +227 -0
- package/dist/render-options.d.ts.map +1 -0
- package/dist/render-options.js +130 -0
- package/dist/render-options.js.map +1 -0
- package/dist/resource-tracking.d.ts +332 -0
- package/dist/resource-tracking.d.ts.map +1 -0
- package/dist/resource-tracking.js +653 -0
- package/dist/resource-tracking.js.map +1 -0
- package/dist/simple.d.ts +276 -0
- package/dist/simple.d.ts.map +1 -0
- package/dist/simple.js +343 -0
- package/dist/simple.js.map +1 -0
- package/dist/stext.d.ts +290 -0
- package/dist/stext.d.ts.map +1 -0
- package/dist/stext.js +312 -0
- package/dist/stext.js.map +1 -0
- package/dist/stream.d.ts +174 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +476 -0
- package/dist/stream.js.map +1 -0
- package/dist/text.d.ts +337 -0
- package/dist/text.d.ts.map +1 -0
- package/dist/text.js +454 -0
- package/dist/text.js.map +1 -0
- package/dist/typed-arrays.d.ts +127 -0
- package/dist/typed-arrays.d.ts.map +1 -0
- package/dist/typed-arrays.js +410 -0
- package/dist/typed-arrays.js.map +1 -0
- package/dist/types.d.ts +358 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +216 -0
- package/dist/types.js.map +1 -0
- package/native/annot.cc +557 -0
- package/native/buffer.cc +204 -0
- package/native/colorspace.cc +166 -0
- package/native/context.cc +84 -0
- package/native/cookie.cc +179 -0
- package/native/device.cc +179 -0
- package/native/display_list.cc +179 -0
- package/native/document.cc +268 -0
- package/native/enhanced.cc +70 -0
- package/native/font.cc +282 -0
- package/native/form.cc +523 -0
- package/native/geometry.cc +255 -0
- package/native/image.cc +216 -0
- package/native/include/micropdf/enhanced.h +38 -0
- package/native/include/micropdf/types.h +36 -0
- package/native/include/micropdf.h +106 -0
- package/native/include/mupdf-ffi.h +39 -0
- package/native/include/mupdf.h +11 -0
- package/native/include/mupdf_minimal.h +381 -0
- package/native/lib/linux-x64/libmicropdf.a +0 -0
- package/native/link.cc +234 -0
- package/native/micropdf.cc +71 -0
- package/native/output.cc +229 -0
- package/native/page.cc +572 -0
- package/native/path.cc +259 -0
- package/native/pixmap.cc +240 -0
- package/native/stext.cc +610 -0
- package/native/stream.cc +239 -0
- package/package.json +120 -0
- package/scripts/build-from-rust.js +97 -0
- package/scripts/install.js +184 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MicroPDF - High-performance PDF manipulation library for Node.js
|
|
3
|
+
*
|
|
4
|
+
* MicroPDF provides comprehensive PDF manipulation capabilities with a clean, type-safe
|
|
5
|
+
* API. Built on top of MuPDF, it offers excellent performance and extensive PDF support.
|
|
6
|
+
*
|
|
7
|
+
* This library provides 100% API compatibility with the Rust MicroPDF library and includes
|
|
8
|
+
* native N-API bindings for optimal performance.
|
|
9
|
+
*
|
|
10
|
+
* ## Features
|
|
11
|
+
*
|
|
12
|
+
* - **PDF Reading & Writing**: Open, modify, and save PDF documents
|
|
13
|
+
* - **Page Rendering**: Render pages to images with custom resolution and colorspace
|
|
14
|
+
* - **Text Extraction**: Extract text with layout information, search capabilities
|
|
15
|
+
* - **Annotations**: Read and modify PDF annotations
|
|
16
|
+
* - **Forms**: Interactive form field support
|
|
17
|
+
* - **Security**: Password protection and permission checking
|
|
18
|
+
* - **Metadata**: Read and write document metadata
|
|
19
|
+
* - **Vector Graphics**: Path construction and manipulation
|
|
20
|
+
* - **Image Processing**: Pixmap manipulation and colorspace conversion
|
|
21
|
+
*
|
|
22
|
+
* ## Quick Start
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import { Document, Matrix } from 'micropdf';
|
|
26
|
+
*
|
|
27
|
+
* // Open a PDF
|
|
28
|
+
* const doc = Document.open('document.pdf');
|
|
29
|
+
*
|
|
30
|
+
* // Get basic info
|
|
31
|
+
* console.log(`Pages: ${doc.pageCount}`);
|
|
32
|
+
* console.log(`Title: ${doc.getMetadata('Title')}`);
|
|
33
|
+
*
|
|
34
|
+
* // Render first page
|
|
35
|
+
* const page = doc.loadPage(0);
|
|
36
|
+
* const matrix = Matrix.scale(2, 2); // 2x zoom
|
|
37
|
+
* const pixmap = page.toPixmap(matrix);
|
|
38
|
+
*
|
|
39
|
+
* // Extract text
|
|
40
|
+
* const text = page.extractText();
|
|
41
|
+
* console.log(text);
|
|
42
|
+
*
|
|
43
|
+
* // Search for text
|
|
44
|
+
* const hits = page.searchText('hello');
|
|
45
|
+
* console.log(`Found ${hits.length} occurrences`);
|
|
46
|
+
*
|
|
47
|
+
* // Clean up
|
|
48
|
+
* page.drop();
|
|
49
|
+
* doc.close();
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* ## Core Modules
|
|
53
|
+
*
|
|
54
|
+
* - {@link document} - PDF document handling and page access
|
|
55
|
+
* - {@link geometry} - 2D geometry primitives (Point, Rect, Matrix)
|
|
56
|
+
* - {@link buffer} - Binary data handling
|
|
57
|
+
* - {@link path} - Vector graphics path construction
|
|
58
|
+
* - {@link pixmap} - Raster image manipulation
|
|
59
|
+
* - {@link text} - Text layout and glyph rendering
|
|
60
|
+
* - {@link colorspace} - Color space management
|
|
61
|
+
*
|
|
62
|
+
* ## Resource Management
|
|
63
|
+
*
|
|
64
|
+
* MicroPDF uses manual resource management for optimal performance. Objects that
|
|
65
|
+
* allocate native resources (Document, Page, Pixmap, etc.) must be explicitly
|
|
66
|
+
* freed using `drop()` or `close()` methods.
|
|
67
|
+
*
|
|
68
|
+
* ```typescript
|
|
69
|
+
* // Always clean up resources
|
|
70
|
+
* const doc = Document.open('document.pdf');
|
|
71
|
+
* try {
|
|
72
|
+
* // Work with document
|
|
73
|
+
* } finally {
|
|
74
|
+
* doc.close();
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* ## Type Safety
|
|
79
|
+
*
|
|
80
|
+
* MicroPDF is written in TypeScript and provides comprehensive type definitions
|
|
81
|
+
* for excellent IDE support and compile-time type checking.
|
|
82
|
+
*
|
|
83
|
+
* ## Performance
|
|
84
|
+
*
|
|
85
|
+
* - Native C bindings to MuPDF for optimal performance
|
|
86
|
+
* - Zero-copy operations where possible
|
|
87
|
+
* - Efficient memory management
|
|
88
|
+
* - Suitable for production workloads
|
|
89
|
+
*
|
|
90
|
+
* @packageDocumentation
|
|
91
|
+
* @module micropdf
|
|
92
|
+
* @preferred
|
|
93
|
+
*/
|
|
94
|
+
export { ErrorCode, MicroPDFError, type PointLike, type RectLike, type IRectLike, type MatrixLike, type QuadLike, type ColorspaceLike, type PixmapLike, SeekOrigin, type StreamLike, type BufferLike, isBufferLike, DocumentPermission, type PageLocation, LinkDestType, type OutlineItem as OutlineItemType, PdfObjectType, type PdfIndirectRef as PdfIndirectRefType, FilterName, type FilterType, type FlateDecodeParams, type CCITTFaxDecodeParams, type DCTDecodeParams, type JBIG2DecodeParams, type RenderOptions, type TextExtractionOptions, type AnnotationLike, FormFieldType, type FormFieldLike } from './types.js';
|
|
95
|
+
export { Point, Rect, IRect, Matrix, Quad } from './geometry.js';
|
|
96
|
+
export { Buffer, BufferReader, BufferWriter } from './buffer.js';
|
|
97
|
+
export { Stream, AsyncStream } from './stream.js';
|
|
98
|
+
export { Document, Page, OutlineItem } from './document.js';
|
|
99
|
+
export { PdfObject, PdfArray, PdfDict, PdfStream, PdfIndirectRef, pdfNull, pdfBool, pdfInt, pdfReal, pdfString, pdfName, pdfArray, pdfDict, pdfObjectCompare, pdfNameEquals, pdfDeepCopy, pdfCopyArray, pdfCopyDict, isNull, isBool, isInt, isReal, isNumber, isName, isString, isArray, isDict, isStream, isIndirect, toBoolDefault, toIntDefault, toRealDefault, toObjNum, toGenNum, pdfKeepObj, pdfDropObj, pdfObjRefs, pdfObjMarked, pdfMarkObj, pdfUnmarkObj, pdfSetObjParent, pdfObjParentNum, pdfNewPoint, pdfNewRect, pdfNewMatrix, pdfNewDate, pdfDictGetKey, pdfDictGetVal, pdfObjIsResolved, pdfResolveIndirect, pdfLoadObject } from './pdf/object.js';
|
|
100
|
+
export { flateEncode, flateDecode, asciiHexEncode, asciiHexDecode, ascii85Encode, ascii85Decode, runLengthEncode, runLengthDecode, lzwDecode, decodeFilter, encodeFilter } from './filter.js';
|
|
101
|
+
export { Path, StrokeState, LineCap, LineJoin, type PathWalker } from './path.js';
|
|
102
|
+
export { Form, FormField, FieldType, FieldAlignment, FieldFlags, type ChoiceOption } from './form.js';
|
|
103
|
+
export { Annotation, AnnotationList, AnnotationType, AnnotationFlags, LineEndingStyle } from './annot.js';
|
|
104
|
+
export { Device, DrawDevice, BBoxDevice, TraceDevice, ListDevice, DeviceType, DeviceHint, BlendMode } from './device.js';
|
|
105
|
+
export { Colorspace, ColorspaceType } from './colorspace.js';
|
|
106
|
+
export { type ExtendedRenderOptions, type RenderProgressCallback, type RenderErrorCallback, AntiAliasLevel, getDefaultRenderOptions, dpiToScale, scaleToDpi, validateRenderOptions, mergeRenderOptions } from './render-options.js';
|
|
107
|
+
export { Pixmap, type PixmapInfo } from './pixmap.js';
|
|
108
|
+
export { Text, Language, type TextSpan, type TextItem, type TextWalker } from './text.js';
|
|
109
|
+
export { STextPage, STextBlockType, WritingMode, type STextCharData, type STextLineData, type STextBlockData, quadToRect, quadsOverlap } from './stext.js';
|
|
110
|
+
export { DisplayList } from './display-list.js';
|
|
111
|
+
export { Link, LinkList, LinkDestinationType } from './link.js';
|
|
112
|
+
export { Cookie, CookieOperation } from './cookie.js';
|
|
113
|
+
export { Font, FontManager, FontFlags, StandardFonts, type GlyphInfo } from './font.js';
|
|
114
|
+
export { Image, ImageDecoder, ImageFormat, ImageOrientation, type ImageInfo } from './image.js';
|
|
115
|
+
export { Output } from './output.js';
|
|
116
|
+
export { Archive, ArchiveFormat, type ArchiveEntry } from './archive.js';
|
|
117
|
+
export { Context, getDefaultContext, setDefaultContext, resetDefaultContext, type ErrorCallback, type WarningCallback, type ContextInfo } from './context.js';
|
|
118
|
+
export { Enhanced, getEnhanced, addWatermark, mergePDFs, splitPDF, optimizePDF, linearizePDF, createBlankDocument, createTextPDF } from './enhanced.js';
|
|
119
|
+
export { MicroPDF, getVersion, type MicroPDFOptions } from './micropdf.js';
|
|
120
|
+
/**
|
|
121
|
+
* Resource tracking utilities for leak detection and memory optimization.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* import {
|
|
126
|
+
* enableTracking,
|
|
127
|
+
* handleRegistry,
|
|
128
|
+
* generateLeakReport,
|
|
129
|
+
* getPoolStats
|
|
130
|
+
* } from 'micropdf';
|
|
131
|
+
*
|
|
132
|
+
* // Enable tracking in development
|
|
133
|
+
* enableTracking(true);
|
|
134
|
+
*
|
|
135
|
+
* // ... use MicroPDF ...
|
|
136
|
+
*
|
|
137
|
+
* // Check for leaks
|
|
138
|
+
* console.log(generateLeakReport());
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
export { ResourceType, handleRegistry, enableTracking, enableStackTraces, isTrackingEnabled, acquirePoint, releasePoint, acquireRect, releaseRect, acquireMatrix, releaseMatrix, acquireQuad, releaseQuad, getPoolStats, clearPools, byteArrayPool, uint8ArrayToString, bufferToString, numberArrayPool, generateLeakReport, printLeakReport, type AllocationInfo, type TypeStats, type GlobalStats } from './resource-tracking.js';
|
|
142
|
+
/**
|
|
143
|
+
* TypedArray utilities for batch numeric operations.
|
|
144
|
+
*
|
|
145
|
+
* Use these functions for performance-critical code that processes
|
|
146
|
+
* large amounts of coordinate, color, or pixel data.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* import {
|
|
151
|
+
* pointsFromCoords,
|
|
152
|
+
* transformPointsInPlace,
|
|
153
|
+
* colorFromRGB,
|
|
154
|
+
* matrixRotate
|
|
155
|
+
* } from 'micropdf';
|
|
156
|
+
*
|
|
157
|
+
* // Create points as Float32Array
|
|
158
|
+
* const points = pointsFromCoords(0, 0, 100, 0, 100, 100, 0, 100);
|
|
159
|
+
*
|
|
160
|
+
* // Transform in-place (no allocation)
|
|
161
|
+
* const m = matrixRotate(45);
|
|
162
|
+
* transformPointsInPlace(points, m[0], m[1], m[2], m[3], m[4], m[5]);
|
|
163
|
+
*
|
|
164
|
+
* // Create colors as Float32Array
|
|
165
|
+
* const red = colorFromRGB(255, 0, 0); // Normalized to [1, 0, 0]
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
export { colorFromRGB, colorFromRGBA, colorFromGray, colorFromCMYK, pointsFromCoords, pointsFromObjects, transformPointsInPlace, transformPoints, rectsFromCoords, rectsFromObjects, transformRectsInPlace, matrixIdentity, matrixTranslate, matrixScale, matrixRotate, matrixConcatInPlace, matrixConcat, pointDistances, pointDistancesSquared, rectContainsPoints, countPointsInRect, convertPixelFormat, premultiplyAlpha, unpremultiplyAlpha } from './typed-arrays.js';
|
|
169
|
+
/** Library version */
|
|
170
|
+
export declare const VERSION = "0.2.0";
|
|
171
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAMH,OAAO,EAEL,SAAS,EACT,aAAa,EAGb,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,QAAQ,EAGb,KAAK,cAAc,EAGnB,KAAK,UAAU,EAGf,UAAU,EACV,KAAK,UAAU,EAGf,KAAK,UAAU,EACf,YAAY,EAGZ,kBAAkB,EAClB,KAAK,YAAY,EACjB,YAAY,EACZ,KAAK,WAAW,IAAI,eAAe,EAGnC,aAAa,EACb,KAAK,cAAc,IAAI,kBAAkB,EAGzC,UAAU,EACV,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK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AgB,EAChB,qBAAqB,EAErB,cAAc,EACd,eAAe,EACf,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,YAAY,EAEZ,cAAc,EACd,qBAAqB,EAErB,kBAAkB,EAClB,iBAAiB,EAEjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAM3B,sBAAsB;AACtB,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MicroPDF - High-performance PDF manipulation library for Node.js
|
|
3
|
+
*
|
|
4
|
+
* MicroPDF provides comprehensive PDF manipulation capabilities with a clean, type-safe
|
|
5
|
+
* API. Built on top of MuPDF, it offers excellent performance and extensive PDF support.
|
|
6
|
+
*
|
|
7
|
+
* This library provides 100% API compatibility with the Rust MicroPDF library and includes
|
|
8
|
+
* native N-API bindings for optimal performance.
|
|
9
|
+
*
|
|
10
|
+
* ## Features
|
|
11
|
+
*
|
|
12
|
+
* - **PDF Reading & Writing**: Open, modify, and save PDF documents
|
|
13
|
+
* - **Page Rendering**: Render pages to images with custom resolution and colorspace
|
|
14
|
+
* - **Text Extraction**: Extract text with layout information, search capabilities
|
|
15
|
+
* - **Annotations**: Read and modify PDF annotations
|
|
16
|
+
* - **Forms**: Interactive form field support
|
|
17
|
+
* - **Security**: Password protection and permission checking
|
|
18
|
+
* - **Metadata**: Read and write document metadata
|
|
19
|
+
* - **Vector Graphics**: Path construction and manipulation
|
|
20
|
+
* - **Image Processing**: Pixmap manipulation and colorspace conversion
|
|
21
|
+
*
|
|
22
|
+
* ## Quick Start
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import { Document, Matrix } from 'micropdf';
|
|
26
|
+
*
|
|
27
|
+
* // Open a PDF
|
|
28
|
+
* const doc = Document.open('document.pdf');
|
|
29
|
+
*
|
|
30
|
+
* // Get basic info
|
|
31
|
+
* console.log(`Pages: ${doc.pageCount}`);
|
|
32
|
+
* console.log(`Title: ${doc.getMetadata('Title')}`);
|
|
33
|
+
*
|
|
34
|
+
* // Render first page
|
|
35
|
+
* const page = doc.loadPage(0);
|
|
36
|
+
* const matrix = Matrix.scale(2, 2); // 2x zoom
|
|
37
|
+
* const pixmap = page.toPixmap(matrix);
|
|
38
|
+
*
|
|
39
|
+
* // Extract text
|
|
40
|
+
* const text = page.extractText();
|
|
41
|
+
* console.log(text);
|
|
42
|
+
*
|
|
43
|
+
* // Search for text
|
|
44
|
+
* const hits = page.searchText('hello');
|
|
45
|
+
* console.log(`Found ${hits.length} occurrences`);
|
|
46
|
+
*
|
|
47
|
+
* // Clean up
|
|
48
|
+
* page.drop();
|
|
49
|
+
* doc.close();
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* ## Core Modules
|
|
53
|
+
*
|
|
54
|
+
* - {@link document} - PDF document handling and page access
|
|
55
|
+
* - {@link geometry} - 2D geometry primitives (Point, Rect, Matrix)
|
|
56
|
+
* - {@link buffer} - Binary data handling
|
|
57
|
+
* - {@link path} - Vector graphics path construction
|
|
58
|
+
* - {@link pixmap} - Raster image manipulation
|
|
59
|
+
* - {@link text} - Text layout and glyph rendering
|
|
60
|
+
* - {@link colorspace} - Color space management
|
|
61
|
+
*
|
|
62
|
+
* ## Resource Management
|
|
63
|
+
*
|
|
64
|
+
* MicroPDF uses manual resource management for optimal performance. Objects that
|
|
65
|
+
* allocate native resources (Document, Page, Pixmap, etc.) must be explicitly
|
|
66
|
+
* freed using `drop()` or `close()` methods.
|
|
67
|
+
*
|
|
68
|
+
* ```typescript
|
|
69
|
+
* // Always clean up resources
|
|
70
|
+
* const doc = Document.open('document.pdf');
|
|
71
|
+
* try {
|
|
72
|
+
* // Work with document
|
|
73
|
+
* } finally {
|
|
74
|
+
* doc.close();
|
|
75
|
+
* }
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* ## Type Safety
|
|
79
|
+
*
|
|
80
|
+
* MicroPDF is written in TypeScript and provides comprehensive type definitions
|
|
81
|
+
* for excellent IDE support and compile-time type checking.
|
|
82
|
+
*
|
|
83
|
+
* ## Performance
|
|
84
|
+
*
|
|
85
|
+
* - Native C bindings to MuPDF for optimal performance
|
|
86
|
+
* - Zero-copy operations where possible
|
|
87
|
+
* - Efficient memory management
|
|
88
|
+
* - Suitable for production workloads
|
|
89
|
+
*
|
|
90
|
+
* @packageDocumentation
|
|
91
|
+
* @module micropdf
|
|
92
|
+
* @preferred
|
|
93
|
+
*/
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// Types
|
|
96
|
+
// ============================================================================
|
|
97
|
+
export {
|
|
98
|
+
// Error types
|
|
99
|
+
ErrorCode, MicroPDFError,
|
|
100
|
+
// Stream types
|
|
101
|
+
SeekOrigin, isBufferLike,
|
|
102
|
+
// Document types
|
|
103
|
+
DocumentPermission, LinkDestType,
|
|
104
|
+
// PDF object types
|
|
105
|
+
PdfObjectType,
|
|
106
|
+
// Filter types
|
|
107
|
+
FilterName,
|
|
108
|
+
// Form types
|
|
109
|
+
FormFieldType } from './types.js';
|
|
110
|
+
// ============================================================================
|
|
111
|
+
// Geometry
|
|
112
|
+
// ============================================================================
|
|
113
|
+
export { Point, Rect, IRect, Matrix, Quad } from './geometry.js';
|
|
114
|
+
// ============================================================================
|
|
115
|
+
// Buffer
|
|
116
|
+
// ============================================================================
|
|
117
|
+
export { Buffer, BufferReader, BufferWriter } from './buffer.js';
|
|
118
|
+
// ============================================================================
|
|
119
|
+
// Stream
|
|
120
|
+
// ============================================================================
|
|
121
|
+
export { Stream, AsyncStream } from './stream.js';
|
|
122
|
+
// ============================================================================
|
|
123
|
+
// Colorspace and Pixmap (basic exports)
|
|
124
|
+
// ============================================================================
|
|
125
|
+
// Note: Full implementations exported later in this file
|
|
126
|
+
// ============================================================================
|
|
127
|
+
// Document
|
|
128
|
+
// ============================================================================
|
|
129
|
+
export { Document, Page, OutlineItem } from './document.js';
|
|
130
|
+
// ============================================================================
|
|
131
|
+
// PDF Objects
|
|
132
|
+
// ============================================================================
|
|
133
|
+
export { PdfObject, PdfArray, PdfDict, PdfStream, PdfIndirectRef,
|
|
134
|
+
// Factory functions
|
|
135
|
+
pdfNull, pdfBool, pdfInt, pdfReal, pdfString, pdfName, pdfArray, pdfDict,
|
|
136
|
+
// Utility functions
|
|
137
|
+
pdfObjectCompare, pdfNameEquals, pdfDeepCopy, pdfCopyArray, pdfCopyDict,
|
|
138
|
+
// Type checking
|
|
139
|
+
isNull, isBool, isInt, isReal, isNumber, isName, isString, isArray, isDict, isStream, isIndirect,
|
|
140
|
+
// Value extraction with defaults
|
|
141
|
+
toBoolDefault, toIntDefault, toRealDefault, toObjNum, toGenNum,
|
|
142
|
+
// Reference counting
|
|
143
|
+
pdfKeepObj, pdfDropObj, pdfObjRefs,
|
|
144
|
+
// Object marking
|
|
145
|
+
pdfObjMarked, pdfMarkObj, pdfUnmarkObj, pdfSetObjParent, pdfObjParentNum,
|
|
146
|
+
// Geometry utilities
|
|
147
|
+
pdfNewPoint, pdfNewRect, pdfNewMatrix, pdfNewDate,
|
|
148
|
+
// Dictionary utilities
|
|
149
|
+
pdfDictGetKey, pdfDictGetVal,
|
|
150
|
+
// Indirect reference utilities
|
|
151
|
+
pdfObjIsResolved, pdfResolveIndirect, pdfLoadObject } from './pdf/object.js';
|
|
152
|
+
// ============================================================================
|
|
153
|
+
// Filters
|
|
154
|
+
// ============================================================================
|
|
155
|
+
export { flateEncode, flateDecode, asciiHexEncode, asciiHexDecode, ascii85Encode, ascii85Decode, runLengthEncode, runLengthDecode, lzwDecode, decodeFilter, encodeFilter } from './filter.js';
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// Path
|
|
158
|
+
// ============================================================================
|
|
159
|
+
export { Path, StrokeState, LineCap, LineJoin } from './path.js';
|
|
160
|
+
// ============================================================================
|
|
161
|
+
// Form
|
|
162
|
+
// ============================================================================
|
|
163
|
+
export { Form, FormField, FieldType, FieldAlignment, FieldFlags } from './form.js';
|
|
164
|
+
// ============================================================================
|
|
165
|
+
// Annotations
|
|
166
|
+
// ============================================================================
|
|
167
|
+
export { Annotation, AnnotationList, AnnotationType, AnnotationFlags, LineEndingStyle } from './annot.js';
|
|
168
|
+
// ============================================================================
|
|
169
|
+
// Device (Rendering)
|
|
170
|
+
// ============================================================================
|
|
171
|
+
export { Device, DrawDevice, BBoxDevice, TraceDevice, ListDevice, DeviceType, DeviceHint, BlendMode } from './device.js';
|
|
172
|
+
// ============================================================================
|
|
173
|
+
// Colorspace (Full Implementation)
|
|
174
|
+
// ============================================================================
|
|
175
|
+
export { Colorspace, ColorspaceType } from './colorspace.js';
|
|
176
|
+
// ============================================================================
|
|
177
|
+
// Rendering Options
|
|
178
|
+
// ============================================================================
|
|
179
|
+
export { AntiAliasLevel, getDefaultRenderOptions, dpiToScale, scaleToDpi, validateRenderOptions, mergeRenderOptions } from './render-options.js';
|
|
180
|
+
// ============================================================================
|
|
181
|
+
// Pixmap (Full Implementation)
|
|
182
|
+
// ============================================================================
|
|
183
|
+
export { Pixmap } from './pixmap.js';
|
|
184
|
+
// ============================================================================
|
|
185
|
+
// Text
|
|
186
|
+
// ============================================================================
|
|
187
|
+
export { Text, Language } from './text.js';
|
|
188
|
+
// ============================================================================
|
|
189
|
+
// Structured Text
|
|
190
|
+
// ============================================================================
|
|
191
|
+
export { STextPage, STextBlockType, WritingMode, quadToRect, quadsOverlap } from './stext.js';
|
|
192
|
+
// ============================================================================
|
|
193
|
+
// Display List
|
|
194
|
+
// ============================================================================
|
|
195
|
+
export { DisplayList } from './display-list.js';
|
|
196
|
+
// ============================================================================
|
|
197
|
+
// Link
|
|
198
|
+
// ============================================================================
|
|
199
|
+
export { Link, LinkList, LinkDestinationType } from './link.js';
|
|
200
|
+
// ============================================================================
|
|
201
|
+
// Cookie (Progress Tracking)
|
|
202
|
+
// ============================================================================
|
|
203
|
+
export { Cookie, CookieOperation } from './cookie.js';
|
|
204
|
+
// ============================================================================
|
|
205
|
+
// Font
|
|
206
|
+
// ============================================================================
|
|
207
|
+
export { Font, FontManager, FontFlags, StandardFonts } from './font.js';
|
|
208
|
+
// ============================================================================
|
|
209
|
+
// Image
|
|
210
|
+
// ============================================================================
|
|
211
|
+
export { Image, ImageDecoder, ImageFormat, ImageOrientation } from './image.js';
|
|
212
|
+
// ============================================================================
|
|
213
|
+
// Output (Binary Writer)
|
|
214
|
+
// ============================================================================
|
|
215
|
+
export { Output } from './output.js';
|
|
216
|
+
// ============================================================================
|
|
217
|
+
// Archive (ZIP, TAR)
|
|
218
|
+
// ============================================================================
|
|
219
|
+
export { Archive, ArchiveFormat } from './archive.js';
|
|
220
|
+
// ============================================================================
|
|
221
|
+
// Context (Error & Memory Management)
|
|
222
|
+
// ============================================================================
|
|
223
|
+
export { Context, getDefaultContext, setDefaultContext, resetDefaultContext } from './context.js';
|
|
224
|
+
// ============================================================================
|
|
225
|
+
// Enhanced API (High-level convenience functions)
|
|
226
|
+
// ============================================================================
|
|
227
|
+
export { Enhanced, getEnhanced, addWatermark, mergePDFs, splitPDF, optimizePDF, linearizePDF, createBlankDocument, createTextPDF } from './enhanced.js';
|
|
228
|
+
// ============================================================================
|
|
229
|
+
// Main API
|
|
230
|
+
// ============================================================================
|
|
231
|
+
export { MicroPDF, getVersion } from './micropdf.js';
|
|
232
|
+
// ============================================================================
|
|
233
|
+
// Resource Tracking and Memory Optimization
|
|
234
|
+
// ============================================================================
|
|
235
|
+
/**
|
|
236
|
+
* Resource tracking utilities for leak detection and memory optimization.
|
|
237
|
+
*
|
|
238
|
+
* @example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* import {
|
|
241
|
+
* enableTracking,
|
|
242
|
+
* handleRegistry,
|
|
243
|
+
* generateLeakReport,
|
|
244
|
+
* getPoolStats
|
|
245
|
+
* } from 'micropdf';
|
|
246
|
+
*
|
|
247
|
+
* // Enable tracking in development
|
|
248
|
+
* enableTracking(true);
|
|
249
|
+
*
|
|
250
|
+
* // ... use MicroPDF ...
|
|
251
|
+
*
|
|
252
|
+
* // Check for leaks
|
|
253
|
+
* console.log(generateLeakReport());
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
export { ResourceType, handleRegistry, enableTracking, enableStackTraces, isTrackingEnabled, acquirePoint, releasePoint, acquireRect, releaseRect, acquireMatrix, releaseMatrix, acquireQuad, releaseQuad, getPoolStats, clearPools, byteArrayPool, uint8ArrayToString, bufferToString, numberArrayPool, generateLeakReport, printLeakReport } from './resource-tracking.js';
|
|
257
|
+
// ============================================================================
|
|
258
|
+
// Easy API - Simplified PDF Operations
|
|
259
|
+
// ============================================================================
|
|
260
|
+
// Temporarily disabled due to API mismatch
|
|
261
|
+
// export {
|
|
262
|
+
// EasyPDF,
|
|
263
|
+
// PDFUtils,
|
|
264
|
+
// type EasyRenderOptions,
|
|
265
|
+
// type PdfMetadata,
|
|
266
|
+
// type PageInfo,
|
|
267
|
+
// type DocumentInfo,
|
|
268
|
+
// type ExtractedText,
|
|
269
|
+
// type SearchResult
|
|
270
|
+
// } from './easy.js';
|
|
271
|
+
// ============================================================================
|
|
272
|
+
// Simple API - Ultra-Simple Function API
|
|
273
|
+
// ============================================================================
|
|
274
|
+
// Temporarily disabled due to API mismatch
|
|
275
|
+
// export {
|
|
276
|
+
// extractText,
|
|
277
|
+
// extractPageText,
|
|
278
|
+
// getPageCount,
|
|
279
|
+
// getMetadata,
|
|
280
|
+
// getInfo as getPdfInfo,
|
|
281
|
+
// renderToPNG,
|
|
282
|
+
// renderAllToPNG,
|
|
283
|
+
// getPageAsPNG,
|
|
284
|
+
// searchText,
|
|
285
|
+
// isEncrypted,
|
|
286
|
+
// saveTextToFile,
|
|
287
|
+
// convertToImages,
|
|
288
|
+
// quickSummary
|
|
289
|
+
// } from './simple.js';
|
|
290
|
+
// ============================================================================
|
|
291
|
+
// TypedArray Utilities - High-Performance Numeric Operations
|
|
292
|
+
// ============================================================================
|
|
293
|
+
/**
|
|
294
|
+
* TypedArray utilities for batch numeric operations.
|
|
295
|
+
*
|
|
296
|
+
* Use these functions for performance-critical code that processes
|
|
297
|
+
* large amounts of coordinate, color, or pixel data.
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* ```typescript
|
|
301
|
+
* import {
|
|
302
|
+
* pointsFromCoords,
|
|
303
|
+
* transformPointsInPlace,
|
|
304
|
+
* colorFromRGB,
|
|
305
|
+
* matrixRotate
|
|
306
|
+
* } from 'micropdf';
|
|
307
|
+
*
|
|
308
|
+
* // Create points as Float32Array
|
|
309
|
+
* const points = pointsFromCoords(0, 0, 100, 0, 100, 100, 0, 100);
|
|
310
|
+
*
|
|
311
|
+
* // Transform in-place (no allocation)
|
|
312
|
+
* const m = matrixRotate(45);
|
|
313
|
+
* transformPointsInPlace(points, m[0], m[1], m[2], m[3], m[4], m[5]);
|
|
314
|
+
*
|
|
315
|
+
* // Create colors as Float32Array
|
|
316
|
+
* const red = colorFromRGB(255, 0, 0); // Normalized to [1, 0, 0]
|
|
317
|
+
* ```
|
|
318
|
+
*/
|
|
319
|
+
export {
|
|
320
|
+
// Color arrays
|
|
321
|
+
colorFromRGB, colorFromRGBA, colorFromGray, colorFromCMYK,
|
|
322
|
+
// Point arrays
|
|
323
|
+
pointsFromCoords, pointsFromObjects, transformPointsInPlace, transformPoints,
|
|
324
|
+
// Rectangle arrays
|
|
325
|
+
rectsFromCoords, rectsFromObjects, transformRectsInPlace,
|
|
326
|
+
// Matrix operations
|
|
327
|
+
matrixIdentity, matrixTranslate, matrixScale, matrixRotate, matrixConcatInPlace, matrixConcat,
|
|
328
|
+
// Distance calculations
|
|
329
|
+
pointDistances, pointDistancesSquared,
|
|
330
|
+
// Containment tests
|
|
331
|
+
rectContainsPoints, countPointsInRect,
|
|
332
|
+
// Pixel operations
|
|
333
|
+
convertPixelFormat, premultiplyAlpha, unpremultiplyAlpha } from './typed-arrays.js';
|
|
334
|
+
// ============================================================================
|
|
335
|
+
// Version
|
|
336
|
+
// ============================================================================
|
|
337
|
+
/** Library version */
|
|
338
|
+
export const VERSION = '0.2.0';
|
|
339
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AAEH,+EAA+E;AAC/E,QAAQ;AACR,+EAA+E;AAE/E,OAAO;AACL,cAAc;AACd,SAAS,EACT,aAAa;AAeb,eAAe;AACf,UAAU,EAKV,YAAY;AAEZ,iBAAiB;AACjB,kBAAkB,EAElB,YAAY;AAGZ,mBAAmB;AACnB,aAAa;AAGb,eAAe;AACf,UAAU;AAcV,aAAa;AACb,aAAa,EAEd,MAAM,YAAY,CAAC;AAEpB,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEjE,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEjE,+EAA+E;AAC/E,SAAS;AACT,+EAA+E;AAE/E,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAElD,+EAA+E;AAC/E,wCAAwC;AACxC,+EAA+E;AAC/E,yDAAyD;AAEzD,+EAA+E;AAC/E,WAAW;AACX,+EAA+E;AAE/E,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5D,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,OAAO,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,cAAc;AACd,oBAAoB;AACpB,OAAO,EACP,OAAO,EACP,MAAM,EACN,O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