Appearance
zeropdf v1.3.0
zeropdf v1.3.0 โ
Enumerations โ
| Enumeration | Description |
|---|---|
| PdfErrorCode | Stable error-code enum used by PdfEngineError to classify failures. |
Classes โ
| Class | Description |
|---|---|
| BufferSink | Streaming output contract implemented by sinks that receive generated PDF byte chunks. |
| NodeStreamSink | A byte sink adapter for writing generated PDF output to a Node.js writable stream while respecting backpressure and stream errors. |
| ParsedPdfDocument | A read-only parsed representation of a PDF document. It provides helpers for inspecting document-level metadata, object references, pages, forms, outlines, structure trees, and source bytes. |
| PdfDocument | A mutable builder for creating new PDF documents from scratch. It manages pages, fonts, metadata, outlines, attachments, accessibility data, encryption, and serialization. |
| PdfEditableDocument | A mutable editor for applying incremental updates to an existing PDF document. It supports page edits, appended pages, form updates, structure changes, embedded resources, and incremental serialization. |
| PdfEngineError | A structured error type thrown when PDF generation, parsing, validation, or editing fails. It carries a stable error code and optional diagnostic details. |
| PdfFlow | A cursor-based layout helper for writing report-style content. It manages vertical flow, spacing, page breaks, headings, paragraphs, links, images, and tables. |
| PdfOutlineItem | A handle for an outline entry in a PDF document. It can receive nested child outline items that point to pages or named destinations. |
| PdfPage | A mutable page builder for placing text, graphics, images, links, annotations, form fields, and structured content on a PDF page. |
| PdfSoftMaskBuilder | Sub-builder for the contents of a luminosity soft-mask Form XObject. Supports path operations only. |
| PdfStructureContainer | A builder for grouping tagged PDF content under a shared structure element. It can add text, blocks, lists, tables, images, and nested sections to the same semantic container. |
| TempFileSink | A byte sink that writes data to a temporary file, reducing memory pressure for very large documents. The temp file is automatically deleted on close (or dispose). |
| WebStreamSink | A byte sink adapter for writing generated PDF output to a Web WritableStream through its default writer. |
Interfaces โ
| Interface | Description |
|---|---|
| AttachmentOptions | Options that describe an embedded file attachment. |
| BlockTextMetrics | Measured size of a wrapped block of text. |
| BmpImageOptions | Options for placing BMP images on a page. |
| BufferSinkOptions | An in-memory byte sink that collects streamed PDF output chunks and exposes them as a single Uint8Array when needed. |
| ByteSink | Streaming output contract implemented by sinks that receive generated PDF byte chunks. |
| CheckBoxOptions | Options for creating a checkbox form field widget. |
| ChoiceFieldOptions | Options for creating a list box or combo box form field. |
| ClosePathCommand | Vector path command that closes the current subpath. |
| CmykColor | CMYK color representation used by drawing and text APIs. |
| CurveToCommand | Vector path command for drawing a cubic Bezier curve. |
| CustomPageSize | Explicit PDF page dimensions in points. |
| DeviceNColor | DeviceN (multi-ink spot color) color representation. Emitted as a DeviceN color space; each tint maps through a Type-2 exponential into the alternate process color at full mix. |
| DocumentEncryptionOptions | Password and permission options for encrypting a generated document. |
| DocumentInfo | Document information dictionary metadata such as title, author, subject, and dates. |
| DocumentOptions | - |
| DocumentOutputIntentOptions | ICC output profile options for generated documents. |
| DocumentPermissions | Permission flags used when creating an encrypted PDF. |
| DocumentSignatureOptions | Detached digital-signature options for generated documents. |
| EmbedTrueTypeFontOptions | Options used when registering a TrueType font with a document. |
| ExtGStateOptions | Graphics-state parameters for fill/stroke alpha and blend mode. Emitted as an inline ExtGState entry referenced by the gs operator. |
| ExtractTextOptions | Options for ParsedPdfDocument.extractText. |
| FieldActions | JavaScript actions attached to a form field. |
| FillStyle | Fill styling for vector paths. |
| FlowBlockSpacingOptions | Per-block margin options for flow-authored content. |
| FlowCheckBoxOptions | Options for placing a checkbox form field through the flow layout API. |
| FlowChoiceFieldOptions | Options for placing a choice form field through the flow layout API. |
| FlowColumnsOptions | Newspaper-style column layout options for flow and template pages. |
| FlowFreeTextOptions | Options for placing a free-text annotation through the flow layout API. |
| FlowHeadingOptions | Flow text options plus heading-level configuration. |
| FlowHighlightOptions | Options for placing a highlight annotation through the flow layout API. |
| FlowImageOptions | Options for placing images through the flow layout API. |
| FlowLinkOptions | Options for placing URI links through the flow layout API. |
| FlowListOptions | Options for placing a tagged list through the flow layout API. |
| FlowNoteOptions | Options for placing a text note annotation through the flow layout API. |
| FlowOptions | Initial layout, typography, and spacing options for a PdfFlow cursor. |
| FlowPushButtonOptions | Options for placing a push-button form field through the flow layout API. |
| FlowRadioGroupOptions | Options for placing a radio-button group through the flow layout API. |
| FlowRichTextOptions | Options for placing a paragraph of inline rich-text runs through the flow layout API. Position and width are supplied by the flow cursor; the remaining fields mirror RichTextOptions. |
| FlowSignatureFieldOptions | Options for placing a signature form field through the flow layout API. |
| FlowSpacingScale | Semantic spacing scale used by flow layout for paragraphs, headings, tables, images, and links. |
| FlowTableOptions | Options for placing tables through the flow layout API. |
| FlowTextFieldOptions | Options for placing a text form field through the flow layout API. |
| FlowTextOptions | Options for placing paragraphs or text blocks through the flow layout API. |
| FontFamilyFaces | The set of faces that make up a font family registered with PdfDocument.registerFontFamily. Once registered, text APIs can select a face by passing the family name as font together with the bold and italic flags, instead of juggling individual font handles. |
| FontFamilyInput | Input accepted by PdfDocument.registerFontFamily. Each face may be a built-in FontName, an already-embedded font handle, or raw font bytes โ bytes are embedded automatically under the family name, so you can register a family in one call without embedding each weight first. |
| FreeTextAnnotationOptions | Options for creating a free-text annotation. |
| GifImageOptions | Options for placing GIF images on a page. |
| GrayColor | Grayscale color representation used by drawing and text APIs. |
| HighlightAnnotationOptions | Options for creating a URI link annotation. |
| InlineTextRun | A single styled segment of inline rich text. Runs passed together to PdfPage.richText or PdfFlow.richParagraph flow on the same line and wrap together as one paragraph; each run carries its own style. |
| Jbig2ImageOptions | Options for placing JBIG2 images on a page. |
| Jp2ImageOptions | Options for placing JPEG 2000 (JP2) images on a page. PDF spec supports JPXDecode filter for JPEG 2000 image data. |
| JpegImageOptions | Options for placing JPEG images on a page. |
| LineToCommand | Vector path command for drawing a straight line. |
| ListItemDefinition | Detailed list item object with optional nested children. |
| ListOptions | Options for rendering tagged ordered or unordered lists. |
| MoveToCommand | Vector path command for moving the current point without drawing. |
| NodeWritableLike | Minimal writable-stream shape accepted by NodeStreamSink. |
| NoteAnnotationOptions | Options for creating a text note annotation. |
| OutlineOptions | Options that control outline item state, such as expansion. |
| PageLabelOptions | Options for assigning logical page labels and numbering styles. |
| PageLinkOptions | Options for creating an internal link annotation to another page. |
| PageOptions | Options for creating or inserting a page. |
| PageTextExtraction | Per-page extraction result. |
| PageTransparencyGroupOptions | Page-level transparency group options. |
| ParagraphHighlightAnnotation | Highlight a substring of a paragraph. |
| ParagraphLinkAnnotation | Wrap a substring in a clickable URI link. |
| ParagraphNoteAnnotation | Attach a sticky-note annotation anchored to a substring. |
| ParagraphSquigglyAnnotation | Draw a squiggly underline beneath a substring (text-markup /Squiggly). |
| ParagraphStrikeOutAnnotation | Strike out a substring of a paragraph (text-markup /StrikeOut). |
| ParagraphUnderlineAnnotation | Underline a substring of a paragraph (text-markup /Underline). |
| ParseDocumentOptions | Options that control parsing behavior for existing PDFs. |
| ParsedPdfAttachment | Attachment metadata discovered while parsing an existing PDF. |
| ParsedPdfEditableStructureElement | Editable structure element handle returned by editable-document queries. |
| ParsedPdfFormField | Form field metadata discovered while parsing an existing PDF. |
| ParsedPdfIndirectObject | Low-level parsed indirect object record. |
| ParsedPdfMetadata | Document metadata discovered while parsing an existing PDF. |
| ParsedPdfNamedDestination | Named destination discovered while parsing an existing PDF. |
| ParsedPdfOutlineItem | Outline item discovered while parsing an existing PDF. |
| ParsedPdfPage | - |
| ParsedPdfPageLabelRange | Page-label range discovered while parsing an existing PDF. |
| ParsedPdfStructureElement | Tagged structure element discovered while parsing an existing PDF. |
| PathStyle | Painting, stroke, fill, transform, and tagging options for vector paths. |
| Pdf2ComplianceIssue | PDF 2.0 conformance issue found while inspecting an existing document. |
| PdfComplianceIssue | Compliance validation issue returned by document validation. |
| PdfEditableStructureQuery | Query criteria for finding editable structure elements. |
| PdfEditableStructureSimilarityOptions | Options for finding structurally similar tagged elements. |
| PdfEmbeddedFont | Font handle returned after embedding a TrueType font in a document. |
| PdfStructureOptions | Accessibility metadata and attributes for tagged PDF structure elements. |
| PlacedTextBlockResult | Result of PdfPage.placeTextBlock: the drawn block metrics plus the next y to continue at. |
| PlacedTextResult | Result of PdfPage.placeText: the drawn size plus the next y to continue at. |
| PngImageOptions | Options for placing PNG images on a page. |
| PositionedTextRun | A single positioned text run produced by extraction. |
| PushButtonOptions | Options for creating a push-button form field. |
| RadioGroupItemOptions | Options for a single radio button in a radio group. |
| RadioGroupOptions | Options for creating a radio-button group form field. |
| RectCommand | Vector path command for adding a rectangle. |
| RgbColor | RGB color representation used by drawing and text APIs. |
| RichTextOptions | Options for laying out a paragraph of inline rich-text runs. Coordinates and width behave like TextBlockOptions; the style fields supply defaults inherited by any InlineTextRun that omits them. |
| SeparationColor | Separation (single-ink spot color) color representation. Emitted as a Separation color space with a Type-2 exponential tint transform mapping the tint scalar to the alternate process color. |
| ShapedGlyph | A single shaped glyph produced by a TextShaper. |
| ShapeStyle | Simplified styling for the PdfPage shape helpers (rect, line, circle, ellipse). The paint mode is inferred: a fill and stroke together paint both; fill alone fills; otherwise the shape is stroked. |
| SignatureFieldOptions | Options for creating a signature form field. |
| SoftMaskHandle | Opaque handle returned by PdfDocument.createLuminositySoftMask. Pass to ExtGStateOptions.softMask to apply the mask. |
| SoftMaskOptions | Options for creating a luminosity-based soft mask Form XObject. |
| SquigglyAnnotationOptions | Options for creating a squiggly text-markup annotation. Draws a wavy underline beneath the rectangle (commonly used to flag spelling or grammar concerns). |
| StrikeOutAnnotationOptions | Options for creating a strike-out text-markup annotation. Draws a horizontal line through the vertical middle of the rectangle. |
| StrokeStyle | Stroke styling for vector paths. |
| SvgImageOptions | Options for rendering SVG vector graphics on a page. |
| TableCellDefinition | Detailed table cell object with span, header, scope, and structure options. |
| TableOptions | Options for rendering tagged tables. |
| TemplateAutoOutlineOptions | Top-level options for rendering a reusable document template. |
| TemplateCheckBoxBlock | Template block for rendering a checkbox form field. |
| TemplateChoiceFieldBlock | Template block for rendering a choice form field. |
| TemplateCustomBlock | Template block for user-defined rendering and estimation logic. |
| TemplateDocumentOptions | Top-level options for rendering template blocks into a complete document. |
| TemplateFreeTextBlock | Template block for rendering a free-text annotation. |
| TemplateHeadingBlock | Template block for rendering a heading. |
| TemplateHighlightBlock | Template block for rendering a highlight annotation. |
| TemplateImageBlock | Template block for rendering a PNG, JPEG, BMP, JBIG2, TIFF, or JPEG2000 image. |
| TemplateLinkBlock | Template block for rendering a URI link. |
| TemplateListBlock | Template block for rendering a tagged list. |
| TemplateNoteBlock | Template block for rendering a text note annotation. |
| TemplatePageBreakBlock | Template block that forces a new page. |
| TemplatePageLinkBlock | Template block for rendering a page-to-page link annotation. |
| TemplatePageNumberOptions | Options for automatic page-number rendering in templates. |
| TemplatePageOptions | Page layout options used by template rendering. |
| TemplateParagraphBlock | Template block for rendering a paragraph. |
| TemplatePathBlock | Template block for rendering vector path commands. |
| TemplatePushButtonBlock | Template block for rendering a push-button form field. |
| TemplateRadioGroupBlock | Template block for rendering a radio-button group form field. |
| TemplateRectBlock | Template block for rendering a rectangle. |
| TemplateRenderContext | Context passed to template header, footer, and page-number callbacks. |
| TemplateRichParagraphBlock | Template block for rendering a paragraph of inline rich-text runs, mixing fonts, weights, sizes, colors, and links on the same wrapping lines. |
| TemplateSectionBlock | Template block that groups child blocks under a structure container. |
| TemplateSignatureFieldBlock | Template block for rendering a signature form field. |
| TemplateStrictLayoutOptions | Strict layout options for templates that must fail instead of overflowing. |
| TemplateStyle | A reusable set of typographic and spacing properties applied to template blocks through a TemplateStylesheet. Stylesheet values are merged beneath each block's inline options, so inline options always win. |
| TemplateStylesheet | Named styles applied to template blocks. Keys are either type selectors matching a block's type ("paragraph", "table", "link", "list", "image", plus per-format image types like "png", and per-level headings "heading"/"heading1".."heading6") or arbitrary class names referenced by a block's class field. |
| TemplateTableBlock | Template block for rendering a table. |
| TemplateTextFieldBlock | Template block for rendering a text form field. |
| TextBlockOptions | Options for laying out wrapped text blocks. |
| TextDefaults | Document-wide text defaults applied to PdfPage.text and PdfPage.textBlock when the corresponding option is omitted on the call. Per-call options always take precedence. |
| TextFieldOptions | Options for creating a text form field. |
| TextMetrics | Measured size of a single line of text. |
| TextOptions | Options for placing a single line of text. |
| TextShaper | Interface for pluggable text shaping engines. |
| TiffImageOptions | Options for placing TIFF images on a page. |
| Transform | Affine transform tuple used for graphics and text placement. |
| UnderlineAnnotationOptions | Options for creating an underline text-markup annotation. The annotation draws a solid underline beneath the rectangle defined by x/y/width/height (the quad runs along the bottom edge of the rect). |
| UriLinkOptions | Options for creating an external URI link annotation. |
| WebpImageOptions | Options for placing WebP images on a page. |
| XmpMetadataOptions | Structured XMP metadata fields used to build an XMP packet. |
Type Aliases โ
| Type Alias | Description |
|---|---|
| BinaryData | Binary input accepted by the library. |
| BuiltInPageSize | Names of page-size presets that can be passed anywhere a PageSize is accepted. |
| ChoiceFieldMode | Choice field display mode for list boxes and combo boxes. |
| ColorInput | A color accepted by drawing and text APIs: a structured PdfColor or a NamedColor string (resolved to RGB during normalization). |
| DocumentConformanceProfile | Supported document conformance profiles for PDF/A and PDF/UA output. |
| DocumentEncryptionAlgorithm | Supported password-encryption algorithms for generated PDFs. |
| FlowMarginShorthand | CSS-like margin shorthand accepted by flow and template APIs. |
| FontName | - |
| HeadingLevel | Heading levels supported by flow-authored tagged content. |
| ImageOptions | Options for the auto-detecting PdfPage.image method. The raster format (PNG, JPEG, GIF, BMP, TIFF, WebP, JPEG 2000) is sniffed from the data. |
| LineCap | Line-cap styles for stroked vector paths. |
| LineJoin | Line-join styles for stroked vector paths. |
| ListItem | Input shape for list items accepted by page list rendering. |
| MeasureRichTextOptions | Options for PdfDocument.measureRichText (position-independent). |
| MeasureTextBlockOptions | Options for PdfDocument.measureTextBlock (position-independent). |
| MeasureTextOptions | Options for PdfDocument.measureText (position-independent). |
| NamedColor | Named colors accepted anywhere a ColorInput is expected. |
| PageLabelStyle | Supported page-label numbering styles. |
| PageSize | Either a built-in page-size name or explicit custom page dimensions. |
| ParagraphTextAnnotation | Inline annotation anchored to a substring of a paragraph's rendered text. |
| PathCommand | Union of vector path commands accepted by page path drawing. |
| PdfBlendMode | PDF blend mode names defined in ISO 32000-2 ยง 11.3.5. |
| PdfBoundingBox | Bounding box tuple in PDF coordinates: left, bottom, right, top. |
| PdfColor | - |
| PdfContainerTag | Standard structure tags that can contain other tagged PDF elements. |
| PdfEditableStructureElement | Editable structure element API for changing roles, alt text, language, and order. |
| PdfFigureStructureTag | Standard structure tags for figure-like content. |
| PdfFont | Font value accepted by text APIs: a built-in FontName, an embedded font handle, or the name of a family registered with PdfDocument.registerFontFamily. |
| PdfRoleMap | Mapping from custom structure roles to standard PDF structure roles. |
| PdfStandardStructureTag | Union of standard PDF structure tags supported by the library. |
| PdfStructureAttributeValue | Values accepted in tagged PDF structure attribute dictionaries. |
| PdfStructureTag | Any supported standard, custom, or artifact structure tag. |
| PdfTextStructureTag | Standard structure tags for text-like tagged PDF content. |
| ProcessColor | Process color used as the alternate color space for a Separation or DeviceN tint transform. |
| TableCell | Input shape accepted for individual table cells. |
| TableHeaderScope | Header scope values for tagged table header cells. |
| TableRow | Input shape accepted for table rows. |
| TemplateBlock | Union of block types accepted by template rendering. |
| TemplatePageNumberAlign | Alignment values supported by template page-number output. |
| TemplateRunningRegion | Callback type for template headers and footers. |
| TextAlign | Horizontal text alignment values. |
| TextDirection | Text direction options, including automatic RTL detection. |
| VerticalAlign | Vertical alignment of content within a box of known height (a table cell or a text block given an explicit height). |
| XmpMetadataInput | XMP metadata input accepted by document metadata APIs. |
Variables โ
| Variable | Description |
|---|---|
| PAGE_SIZES | Built-in page size presets expressed in PDF points, keyed by the supported page-size names. |
Functions โ
| Function | Description |
|---|---|
| appendPages | Appends selected pages from one PDF to the end of another PDF and returns the updated document bytes. |
| cm | Converts centimetres to points (1 cm = 72 / 2.54 pt). |
| cmyk | Creates a CMYK color object using normalized channel values from 0 to 1. |
| color | Resolves a NamedColor to an RGB color. Also accepts a #RGB/#RRGGBB hex string. Throws PdfErrorCode.INVALID_COLOR for an unknown name. |
| createDocument | Creates a new PDF document builder for generating pages, text, graphics, forms, metadata, tagging, and attachments. |
| deviceN | Creates a DeviceN (multi-ink spot) color. |
| editDocument | Opens an existing PDF for incremental edits such as appending pages, updating fields, changing structure metadata, and preserving existing bytes when possible. |
| extractPages | Creates a new PDF containing only the selected pages from an existing document. |
| gray | Creates a grayscale color object using a normalized value from 0 for black to 1 for white. |
| hex | Creates an RGB color object from a CSS-style #RGB or #RRGGBB hex string. |
| inch | Converts inches to points (1 in = 72 pt). |
| mergeDocuments | Combines multiple PDF documents into a single PDF in the order provided. |
| mm | Converts millimetres to points (1 mm = 72 / 25.4 pt). |
| parseDocument | Parses PDF bytes into an inspection object for metadata, pages, forms, outlines, attachments, and structure information. |
| pt | Identity converter for points. Provided for symmetry with mm, cm, and inch so unit intent stays explicit at call sites. |
| rgb | Creates an RGB color object using normalized channel values from 0 to 1. |
| separation | Creates a Separation (single-ink spot) color. |
| splitDocument | Splits a PDF into one single-page PDF byte array per source page. |
| validatePdf2Conformance | Validates a parsed document for PDF 2.0 features that this library can detect as deprecated or removed. |