Globals
@scaryterry/pdfium - Universal PDFium WASM wrapper for Browser and Node.js
This is the main entry point that auto-detects the environment and loads the appropriate implementation.
Enumerations
Section titled “Enumerations”| Enumeration | Description |
|---|---|
| ActionType | PDF action types. |
| AnnotationAppearanceMode | Appearance mode for annotation appearance streams. |
| AnnotationFlags | Annotation flags as bit flags. |
| AnnotationType | PDF annotation subtype values. |
| AttachmentValueType | Value types for attachment dictionary entries. |
| BlendMode | Blend modes for page objects. |
| DestinationFitType | Destination view fit types. |
| DocMDPPermission | DocMDP (Modification Detection and Prevention) permission levels. |
| DocumentActionType | Document-level action types for form events. |
| DocumentAvailability | Document availability status for progressive loading. |
| DocumentPermission | PDF document permission flags. |
| DuplexMode | Duplex printing mode for PDF viewer preferences. |
| FlattenFlags | Flags for page flattening operation. |
| FlattenResult | Result of flattening a PDF page. |
| FontFlags | Font descriptor flags. |
| FontType | Font type for loading custom fonts. |
| FormFieldFlags | Form field flags as bit flags. |
| FormFieldType | Form field types for widget annotations. |
| FormModifierFlags | Keyboard modifier flags for form event methods. |
| FormType | Form types in a PDF document. |
| ImageColourSpace | Image colour space types. |
| ImageMarkedContentType | Image marked content type. |
| LinearisationStatus | Linearisation status of a PDF document. |
| LineCapStyle | Line cap styles for path strokes. |
| LineJoinStyle | Line join styles for path strokes. |
| PageActionType | Page-level action types for form events. |
| PageBoxType | PDF page box types. |
| PageMode | PDF document page mode (initial view when opened). |
| PageObjectMarkValueType | Value types for page object mark parameters. |
| PageObjectType | Page object types in PDFium. |
| PageRotation | Page rotation values. |
| PathFillMode | Path fill mode flags for path drawing operations. |
| PathSegmentType | Path segment types in a PDF path object. |
| PDFiumErrorCode | Error codes for PDFium operations, grouped by category. |
| ProgressiveRenderStatus | Status of progressive rendering. |
| SaveFlags | Flags controlling how a document is saved. |
| TextRenderMode | Text rendering modes as defined in PDF specification. |
| TextSearchFlags | Flags for text search behaviour. |
Classes
Section titled “Classes”| Class | Description |
|---|---|
| AsyncDisposable | Base class for async disposable PDFium resources. |
| Disposable | Base class for disposable PDFium resources. |
| DocumentError | Error loading or accessing a document. |
| EventEmitter | - |
| InitialisationError | Error during library initialisation. |
| MemoryError | Error during memory operations. |
| NativePDFiumDocument | A PDF document backed by the native PDFium addon. |
| NativePDFiumInstance | A PDFium instance backed by the native addon. |
| NativePDFiumPage | A PDF page backed by the native PDFium addon. |
| NetworkError | Error during network operations. |
| ObjectError | Error accessing page objects. |
| PageError | Error accessing or rendering a page. |
| PDFium | Main PDFium library class. |
| PDFiumAnnotation | Represents a single annotation on a PDF page. |
| PDFiumAttachmentWriter | - |
| PDFiumBuilderFont | A standard PDF font loaded via PDFiumDocumentBuilder.loadStandardFont. |
| PDFiumDocument | Represents a loaded PDF document. |
| PDFiumDocumentBuilder | Builder for creating new PDF documents from scratch. |
| PDFiumError | Base error class for all PDFium errors. |
| PDFiumFont | Represents a font from a PDF text object. |
| PDFiumImageObject | Image object on a PDF page. |
| PDFiumPage | Represents a single page in a PDF document. |
| PDFiumPageBuilder | Builder for adding content to a PDF page. |
| PDFiumPageObject | Base class for all PDF page objects. |
| PDFiumPathObject | Path object on a PDF page. |
| PDFiumPathSegment | A segment of a PDF path object. |
| PDFiumTextObject | Text object on a PDF page. |
| PermissionsError | Error due to insufficient permissions. |
| ProgressivePDFLoader | Progressive PDF loader for linearised documents. |
| ProgressiveRenderContext | Context for progressive PDF page rendering. |
| RenderError | Error during rendering operations. |
| TextError | Error during text extraction. |
| WorkerError | Error during worker operations. |
| WorkerPDFium | High-level worker-backed PDFium instance. |
| WorkerPDFiumDocument | High-level worker-backed PDF document. |
| WorkerPDFiumPage | High-level worker-backed PDF page. |
| WorkerProxy | Worker proxy for off-main-thread PDF processing. |
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| Annotation | Represents a single annotation on a PDF page. |
| AnnotationBorder | Border properties for an annotation. |
| Bookmark | Represents a bookmark (outline entry) in a PDF document. |
| CharacterInfo | Extended information about a character in a PDF page. |
| CharBox | Bounding box of a single character in page coordinates. |
| Colour | RGBA colour value. |
| CoordinateTransformContext | Context for coordinate transformation between device and page space. |
| DashPattern | Dash pattern for stroked paths. |
| DeviceCoordinate | A point in device coordinate space (pixels). |
| DocumentEvents | Events emitted by PDFiumDocument. |
| DocumentMetadata | Standard PDF metadata fields. |
| DocumentPermissions | Structured document permissions decoded from the raw bitmask. |
| ExtendedAnnotation | Extended annotation information with additional details. |
| FontInfo | Information about a font. |
| FontMetrics | Font metrics at a specific size. |
| FormObject | Form object on a PDF page. |
| IDocumentReader | Interface for reading PDF documents. |
| ImageMetadata | Metadata for an image object in a PDF. |
| ImageObject | Image object on a PDF page. |
| ImportPagesOptions | Options for importing pages from another document. |
| IPageReader | Interface for interacting with a PDF page. |
| IProgressiveRenderContext | Interface for progressive rendering context. |
| JavaScriptAction | Information about a JavaScript action in a PDF document. |
| LinePoints | A line segment with start and end points. |
| LoadPageResponse | Response payload for page load. |
| Logger | Interface for handling log messages. |
| NamedDestination | Named destination in a PDF document. |
| NUpLayoutOptions | Options for creating an N-up layout document. |
| OpenDocumentOptions | Options for opening a PDF document. |
| OpenDocumentResponse | Response payload for document open. |
| PageBox | Rectangle representing a page box. |
| PageCoordinate | A point in page coordinate space (points, 1/72 inch). |
| PageCreationOptions | Options for creating a new page. |
| PageObjectBase | Base interface for page objects. |
| PageObjectMark | A content mark on a page object. |
| PageSize | Page dimensions in points (1/72 inch). |
| PageSizeResponse | Response payload for page size. |
| PathObject | Path object on a PDF page. |
| PDFAction | An action in a PDF document. |
| PDFAttachment | A file attachment embedded in a PDF document. |
| PDFDestination | A destination within a PDF document. |
| PDFiumConfig | - |
| PDFiumInitOptions | Options for initialising the PDFium library. |
| PDFiumLimits | Configurable resource limits for PDFium operations. |
| PDFLink | A link on a PDF page. |
| PDFSignature | Digital signature information from a PDF. |
| Point | A point in 2D space. |
| QuadPoints | Quad points for text markup annotations (highlight, underline, etc.). |
| Rect | A bounding rectangle in page coordinates (points, origin at bottom-left). |
| RenderOptions | Options for rendering a PDF page. |
| RenderPagePayload | Payload for page rendering request. |
| RenderPageResponse | Response payload for page rendering. |
| RenderResult | Result of rendering a PDF page. |
| SaveOptions | Options for saving a PDF document. |
| SerialisedError | Serialised error for worker communication. |
| ShadingObject | Shading object on a PDF page. |
| ShapeStyle | Style options for shape objects (rectangles, paths). |
| StructureElement | A structure element in a tagged PDF’s structure tree. |
| TextObject | Text object on a PDF page. |
| TextSearchResult | A single text search result with position information. |
| TransformMatrix | A 2D transformation matrix. |
| UnknownObject | Unknown or unrecognised page object type. |
| ViewerPreferences | Viewer preferences for a PDF document. |
| WebLink | A web link detected in page text content. |
| WidgetAnnotation | Form widget annotation with field information. |
| WidgetOption | An option in a combo/list box widget. |
| WorkerErrorEvent | Minimal error event used by WorkerTransport. |
| WorkerMessageEvent | Minimal message event used by WorkerTransport. |
| WorkerPDFiumOptions | Options for creating a high-level worker-backed PDFium instance. |
| WorkerProxyOptions | Options for creating a worker proxy. |
| WorkerTransport | Minimal worker transport abstraction shared by browser Worker and Node worker_threads. |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| AnnotationColourType | The colour channel of an annotation to get or set. |
| AnnotationDictionaryKey | Well-known annotation dictionary keys. |
| DestroyPayload | Payload for destroy request (intentionally empty). |
| DictionaryKey | Key for annotation dictionary lookups. |
| EventListener | - |
| FormMouseButton | Mouse button identifier for form interaction methods. |
| PageObject | Union type for all page objects. |
| PageObjectMarkParam | A parameter on a page object mark. |
| ProgressCallback | Progress callback for long-running operations. |
| WorkerRequest | Request types sent from main thread to worker. |
| WorkerResponse | Response types sent from worker to main thread. |
Variables
Section titled “Variables”| Variable | Description |
|---|---|
| DEFAULT_LIMITS | Default resource limits. |
| VERSION | - |
| WASM_HASH | - |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| configure | Update the global configuration. |
| getConfig | Get the current configuration. |
| getErrorMessage | Gets the default message for an error code. |