Skip to content

Globals

@scaryterry/pdfium


@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.

EnumerationDescription
ActionTypePDF action types.
AnnotationAppearanceModeAppearance mode for annotation appearance streams.
AnnotationFlagsAnnotation flags as bit flags.
AnnotationTypePDF annotation subtype values.
AttachmentValueTypeValue types for attachment dictionary entries.
BlendModeBlend modes for page objects.
DestinationFitTypeDestination view fit types.
DocMDPPermissionDocMDP (Modification Detection and Prevention) permission levels.
DocumentActionTypeDocument-level action types for form events.
DocumentAvailabilityDocument availability status for progressive loading.
DocumentPermissionPDF document permission flags.
DuplexModeDuplex printing mode for PDF viewer preferences.
FlattenFlagsFlags for page flattening operation.
FlattenResultResult of flattening a PDF page.
FontFlagsFont descriptor flags.
FontTypeFont type for loading custom fonts.
FormFieldFlagsForm field flags as bit flags.
FormFieldTypeForm field types for widget annotations.
FormModifierFlagsKeyboard modifier flags for form event methods.
FormTypeForm types in a PDF document.
ImageColourSpaceImage colour space types.
ImageMarkedContentTypeImage marked content type.
LinearisationStatusLinearisation status of a PDF document.
LineCapStyleLine cap styles for path strokes.
LineJoinStyleLine join styles for path strokes.
PageActionTypePage-level action types for form events.
PageBoxTypePDF page box types.
PageModePDF document page mode (initial view when opened).
PageObjectMarkValueTypeValue types for page object mark parameters.
PageObjectTypePage object types in PDFium.
PageRotationPage rotation values.
PathFillModePath fill mode flags for path drawing operations.
PathSegmentTypePath segment types in a PDF path object.
PDFiumErrorCodeError codes for PDFium operations, grouped by category.
ProgressiveRenderStatusStatus of progressive rendering.
SaveFlagsFlags controlling how a document is saved.
TextRenderModeText rendering modes as defined in PDF specification.
TextSearchFlagsFlags for text search behaviour.
ClassDescription
AsyncDisposableBase class for async disposable PDFium resources.
DisposableBase class for disposable PDFium resources.
DocumentErrorError loading or accessing a document.
EventEmitter-
InitialisationErrorError during library initialisation.
MemoryErrorError during memory operations.
NativePDFiumDocumentA PDF document backed by the native PDFium addon.
NativePDFiumInstanceA PDFium instance backed by the native addon.
NativePDFiumPageA PDF page backed by the native PDFium addon.
NetworkErrorError during network operations.
ObjectErrorError accessing page objects.
PageErrorError accessing or rendering a page.
PDFiumMain PDFium library class.
PDFiumAnnotationRepresents a single annotation on a PDF page.
PDFiumAttachmentWriter-
PDFiumBuilderFontA standard PDF font loaded via PDFiumDocumentBuilder.loadStandardFont.
PDFiumDocumentRepresents a loaded PDF document.
PDFiumDocumentBuilderBuilder for creating new PDF documents from scratch.
PDFiumErrorBase error class for all PDFium errors.
PDFiumFontRepresents a font from a PDF text object.
PDFiumImageObjectImage object on a PDF page.
PDFiumPageRepresents a single page in a PDF document.
PDFiumPageBuilderBuilder for adding content to a PDF page.
PDFiumPageObjectBase class for all PDF page objects.
PDFiumPathObjectPath object on a PDF page.
PDFiumPathSegmentA segment of a PDF path object.
PDFiumTextObjectText object on a PDF page.
PermissionsErrorError due to insufficient permissions.
ProgressivePDFLoaderProgressive PDF loader for linearised documents.
ProgressiveRenderContextContext for progressive PDF page rendering.
RenderErrorError during rendering operations.
TextErrorError during text extraction.
WorkerErrorError during worker operations.
WorkerPDFiumHigh-level worker-backed PDFium instance.
WorkerPDFiumDocumentHigh-level worker-backed PDF document.
WorkerPDFiumPageHigh-level worker-backed PDF page.
WorkerProxyWorker proxy for off-main-thread PDF processing.
InterfaceDescription
AnnotationRepresents a single annotation on a PDF page.
AnnotationBorderBorder properties for an annotation.
BookmarkRepresents a bookmark (outline entry) in a PDF document.
CharacterInfoExtended information about a character in a PDF page.
CharBoxBounding box of a single character in page coordinates.
ColourRGBA colour value.
CoordinateTransformContextContext for coordinate transformation between device and page space.
DashPatternDash pattern for stroked paths.
DeviceCoordinateA point in device coordinate space (pixels).
DocumentEventsEvents emitted by PDFiumDocument.
DocumentMetadataStandard PDF metadata fields.
DocumentPermissionsStructured document permissions decoded from the raw bitmask.
ExtendedAnnotationExtended annotation information with additional details.
FontInfoInformation about a font.
FontMetricsFont metrics at a specific size.
FormObjectForm object on a PDF page.
IDocumentReaderInterface for reading PDF documents.
ImageMetadataMetadata for an image object in a PDF.
ImageObjectImage object on a PDF page.
ImportPagesOptionsOptions for importing pages from another document.
IPageReaderInterface for interacting with a PDF page.
IProgressiveRenderContextInterface for progressive rendering context.
JavaScriptActionInformation about a JavaScript action in a PDF document.
LinePointsA line segment with start and end points.
LoadPageResponseResponse payload for page load.
LoggerInterface for handling log messages.
NamedDestinationNamed destination in a PDF document.
NUpLayoutOptionsOptions for creating an N-up layout document.
OpenDocumentOptionsOptions for opening a PDF document.
OpenDocumentResponseResponse payload for document open.
PageBoxRectangle representing a page box.
PageCoordinateA point in page coordinate space (points, 1/72 inch).
PageCreationOptionsOptions for creating a new page.
PageObjectBaseBase interface for page objects.
PageObjectMarkA content mark on a page object.
PageSizePage dimensions in points (1/72 inch).
PageSizeResponseResponse payload for page size.
PathObjectPath object on a PDF page.
PDFActionAn action in a PDF document.
PDFAttachmentA file attachment embedded in a PDF document.
PDFDestinationA destination within a PDF document.
PDFiumConfig-
PDFiumInitOptionsOptions for initialising the PDFium library.
PDFiumLimitsConfigurable resource limits for PDFium operations.
PDFLinkA link on a PDF page.
PDFSignatureDigital signature information from a PDF.
PointA point in 2D space.
QuadPointsQuad points for text markup annotations (highlight, underline, etc.).
RectA bounding rectangle in page coordinates (points, origin at bottom-left).
RenderOptionsOptions for rendering a PDF page.
RenderPagePayloadPayload for page rendering request.
RenderPageResponseResponse payload for page rendering.
RenderResultResult of rendering a PDF page.
SaveOptionsOptions for saving a PDF document.
SerialisedErrorSerialised error for worker communication.
ShadingObjectShading object on a PDF page.
ShapeStyleStyle options for shape objects (rectangles, paths).
StructureElementA structure element in a tagged PDF’s structure tree.
TextObjectText object on a PDF page.
TextSearchResultA single text search result with position information.
TransformMatrixA 2D transformation matrix.
UnknownObjectUnknown or unrecognised page object type.
ViewerPreferencesViewer preferences for a PDF document.
WebLinkA web link detected in page text content.
WidgetAnnotationForm widget annotation with field information.
WidgetOptionAn option in a combo/list box widget.
WorkerErrorEventMinimal error event used by WorkerTransport.
WorkerMessageEventMinimal message event used by WorkerTransport.
WorkerPDFiumOptionsOptions for creating a high-level worker-backed PDFium instance.
WorkerProxyOptionsOptions for creating a worker proxy.
WorkerTransportMinimal worker transport abstraction shared by browser Worker and Node worker_threads.
Type AliasDescription
AnnotationColourTypeThe colour channel of an annotation to get or set.
AnnotationDictionaryKeyWell-known annotation dictionary keys.
DestroyPayloadPayload for destroy request (intentionally empty).
DictionaryKeyKey for annotation dictionary lookups.
EventListener-
FormMouseButtonMouse button identifier for form interaction methods.
PageObjectUnion type for all page objects.
PageObjectMarkParamA parameter on a page object mark.
ProgressCallbackProgress callback for long-running operations.
WorkerRequestRequest types sent from main thread to worker.
WorkerResponseResponse types sent from worker to main thread.
VariableDescription
DEFAULT_LIMITSDefault resource limits.
VERSION-
WASM_HASH-
FunctionDescription
configureUpdate the global configuration.
getConfigGet the current configuration.
getErrorMessageGets the default message for an error code.