sempdf

sempdf v1.9.1

sempdf v1.9.1


Enumerations

EnumerationDescription
PdfErrorCodeStable error-code enum used by PdfEngineError to classify failures.

Classes

ClassDescription
BufferSinkStreaming output contract implemented by sinks that receive generated PDF byte chunks.
NodeStreamSinkA byte sink adapter for writing generated PDF output to a Node.js writable stream while respecting backpressure and stream errors.
ParsedPdfDocumentA 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.
PdfDocumentA mutable builder for creating new PDF documents from scratch. It manages pages, fonts, metadata, outlines, attachments, accessibility data, encryption, and serialization.
PdfEditableDocumentA 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.
PdfEngineErrorA structured error type thrown when PDF generation, parsing, validation, or editing fails. It carries a stable error code and optional diagnostic details.
PdfFlowA cursor-based layout helper for writing report-style content. It manages vertical flow, spacing, page breaks, headings, paragraphs, links, images, and tables.
PdfOutlineItemA handle for an outline entry in a PDF document. It can receive nested child outline items that point to pages or named destinations.
PdfPageA mutable page builder for placing text, graphics, images, links, annotations, form fields, and structured content on a PDF page.
PdfSoftMaskBuilderSub-builder for the contents of a luminosity soft-mask Form XObject. Supports path operations only.
PdfStructureContainer-
TempFileSinkA 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).
WebStreamSinkA byte sink adapter for writing generated PDF output to a Web WritableStream through its default writer.

Interfaces

InterfaceDescription
AttachmentOptionsOptions that describe an embedded file attachment.
BlockPositionAbsolute placement for a block. When a block carries a position, it is drawn at these PDF-point coordinates instead of flowing. Geometry and page routing live here; the block's own fields carry its content and style.
BlockTextMetricsMeasured size of a wrapped block of text.
BmpImageOptionsOptions for placing BMP images on a page.
BufferSinkOptionsAn in-memory byte sink that collects streamed PDF output chunks and exposes them as a single Uint8Array when needed.
ByteSinkStreaming output contract implemented by sinks that receive generated PDF byte chunks.
CheckBoxOptionsOptions for creating a checkbox form field widget.
ChoiceFieldOptionsOptions for creating a list box or combo box form field.
ClosePathCommandVector path command that closes the current subpath.
CmykColorCMYK color representation used by drawing and text APIs.
CodeContinuationInfoPosition of one fragment of a code block that was split across pages or columns, passed to the continuation-label callbacks.
CodeHighlightRuleA regular-expression colouring rule applied to the visual lines of a code block. Rules are evaluated in order and never overwrite a span already claimed by an earlier rule, so put the most specific patterns first (strings and comments before keywords).
ConfiguredFonts-
CurveToCommandVector path command for drawing a cubic Bezier curve.
CustomPageSizeExplicit PDF page dimensions in points.
DeviceNColorDeviceN (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.
DocumentEncryptionOptionsPassword and permission options for encrypting a generated document.
DocumentInfoDocument information dictionary metadata such as title, author, subject, and dates.
DocumentOptions-
DocumentOutputIntentOptionsICC output profile options for generated documents.
DocumentPermissionsPermission flags used when creating an encrypted PDF.
DocumentSignatureOptionsDetached digital-signature options for generated documents.
EmbedTrueTypeFontOptionsOptions used when registering a TrueType font with a document.
ExtensionFontPaths-
ExtGStateOptionsGraphics-state parameters for fill/stroke alpha and blend mode. Emitted as an inline ExtGState entry referenced by the gs operator.
ExtractTextOptionsOptions for ParsedPdfDocument.extractText.
FieldActionsJavaScript actions attached to a form field.
FillStyleFill styling for vector paths.
FlowBlockSpacingOptionsPer-block margin options for flow-authored content.
FlowCheckBoxOptionsOptions for placing a checkbox form field through the flow layout API.
FlowChoiceFieldOptionsOptions for placing a choice form field through the flow layout API.
FlowCodeOptionsOptions for placing a preformatted code block through the flow layout API.
FlowColumnsOptionsNewspaper-style column layout options for flow and template pages.
FlowFreeTextOptionsOptions for placing a free-text annotation through the flow layout API.
FlowHeadingOptionsFlow text options plus heading-level configuration.
FlowHighlightOptionsOptions for placing a highlight annotation through the flow layout API.
FlowImageOptionsOptions for placing images through the flow layout API.
FlowLinkOptionsOptions for placing URI links through the flow layout API.
FlowListOptionsOptions for placing a tagged list through the flow layout API.
FlowNoteOptionsOptions for placing a text note annotation through the flow layout API.
FlowOptionsInitial layout, typography, and spacing options for a PdfFlow cursor.
FlowPushButtonOptionsOptions for placing a push-button form field through the flow layout API.
FlowRadioGroupOptionsOptions for placing a radio-button group through the flow layout API.
FlowRichTextOptionsOptions 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.
FlowSignatureFieldOptionsOptions for placing a signature form field through the flow layout API.
FlowSpacingScaleSemantic spacing scale used by flow layout for paragraphs, headings, tables, images, links, and code blocks.
FlowTableOptionsOptions for placing tables through the flow layout API.
FlowTextFieldOptionsOptions for placing a text form field through the flow layout API.
FlowTextOptionsOptions for placing paragraphs or text blocks through the flow layout API.
FontConfigurationHigh-level font configuration accepted by PdfDocument.fonts.
FontFamilyFacesThe 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.
FontFamilyInputInput 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.
FontFamilySourcesSources for the regular, bold, italic, and bold-italic faces of a family.
FreeTextAnnotationOptionsOptions for creating a free-text annotation.
GifImageOptionsOptions for placing GIF images on a page.
GrayColorGrayscale color representation used by drawing and text APIs.
HighlightAnnotationOptionsOptions for creating a URI link annotation.
HtmlImageResolutionImage bytes resolved for an <img> element.
HtmlToBlocksOptionsOptions controlling htmlToBlocks.
ImageFitOptionsFit, positioning, and clipping controls shared by all raster image placements. The image is always laid out inside its width×height box.
InlineTextRunA 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.
Jbig2ImageOptionsOptions for placing JBIG2 images on a page.
Jp2ImageOptionsOptions for placing JPEG 2000 (JP2) images on a page. PDF spec supports JPXDecode filter for JPEG 2000 image data.
JpegImageOptionsOptions for placing JPEG images on a page.
JsonFontDeclarationDeclares a font family, referenced from block options by name.
JsonFontFacesA multi-weight font, each face loaded from its own source.
JsonImageBlockAn image block expressed with a src instead of in-memory data.
LineToCommandVector path command for drawing a straight line.
ListItemDefinitionDetailed list item object with optional nested children.
ListOptionsOptions for rendering tagged ordered or unordered lists.
LoadGoogleFontOptionsOptions for loadGoogleFont.
MoveToCommandVector path command for moving the current point without drawing.
NodeWritableLikeMinimal writable-stream shape accepted by NodeStreamSink.
NoteAnnotationOptionsOptions for creating a text note annotation.
OutlineOptionsOptions that control outline item state, such as expansion.
PageLabelOptionsOptions for assigning logical page labels and numbering styles.
PageLinkOptionsOptions for creating an internal link annotation to another page.
PageOptionsOptions for creating or inserting a page.
PageTextExtractionPer-page extraction result.
PageTransparencyGroupOptionsPage-level transparency group options.
ParagraphHighlightAnnotationHighlight a substring of a paragraph.
ParagraphLinkAnnotationWrap a substring in a clickable URI link.
ParagraphNoteAnnotationAttach a sticky-note annotation anchored to a substring.
ParagraphSquigglyAnnotationDraw a squiggly underline beneath a substring (text-markup /Squiggly).
ParagraphStrikeOutAnnotationStrike out a substring of a paragraph (text-markup /StrikeOut).
ParagraphUnderlineAnnotationUnderline a substring of a paragraph (text-markup /Underline).
ParseDocumentOptionsOptions that control parsing behavior for existing PDFs.
ParsedPdfAttachmentAttachment metadata discovered while parsing an existing PDF.
ParsedPdfEditableStructureElementEditable structure element handle returned by editable-document queries.
ParsedPdfFormFieldForm field metadata discovered while parsing an existing PDF.
ParsedPdfIndirectObjectLow-level parsed indirect object record.
ParsedPdfMetadataDocument metadata discovered while parsing an existing PDF.
ParsedPdfNamedDestinationNamed destination discovered while parsing an existing PDF.
ParsedPdfOutlineItemOutline item discovered while parsing an existing PDF.
ParsedPdfPage-
ParsedPdfPageLabelRangePage-label range discovered while parsing an existing PDF.
ParsedPdfStructureElementTagged structure element discovered while parsing an existing PDF.
PathStylePainting, stroke, fill, transform, and tagging options for vector paths.
Pdf2ComplianceIssuePDF 2.0 conformance issue found while inspecting an existing document.
PdfComplianceIssueCompliance validation issue returned by document validation.
PdfComplianceLocationWhere a compliance issue was found, so the offending content can be located in the source document.
PdfDocumentJsonA complete, JSON-serializable description of a PDF document. Pass it to renderDocumentJson to produce PDF bytes.
PdfEditableStructureQueryQuery criteria for finding editable structure elements.
PdfEditableStructureSimilarityOptionsOptions for finding structurally similar tagged elements.
PdfEmbeddedFontFont handle returned after embedding a TrueType font in a document.
PdfStructureOptionsAccessibility metadata and attributes for tagged PDF structure elements.
PlacedTextBlockResultResult of PdfPage.placeTextBlock: the drawn block metrics plus the next y to continue at.
PlacedTextResultResult of PdfPage.placeText: the drawn size plus the next y to continue at.
PngImageOptionsOptions for placing PNG images on a page.
PositionedTextRunA single positioned text run produced by extraction.
PushButtonOptionsOptions for creating a push-button form field.
RadioGroupItemOptionsOptions for a single radio button in a radio group.
RadioGroupOptionsOptions for creating a radio-button group form field.
RectCommandVector path command for adding a rectangle.
RenderDocumentJsonOptionsRuntime-only assets and defaults used while rendering document JSON.
RgbColorRGB color representation used by drawing and text APIs.
RichTextOptionsOptions 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.
SeparationColorSeparation (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.
ShapedGlyphA single shaped glyph produced by a TextShaper.
ShapeStyleSimplified 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.
SignatureFieldOptionsOptions for creating a signature form field.
SoftMaskHandleOpaque handle returned by PdfDocument.createLuminositySoftMask. Pass to ExtGStateOptions.softMask to apply the mask.
SoftMaskOptionsOptions for creating a luminosity-based soft mask Form XObject.
SquigglyAnnotationOptionsOptions for creating a squiggly text-markup annotation. Draws a wavy underline beneath the rectangle (commonly used to flag spelling or grammar concerns).
StrikeOutAnnotationOptionsOptions for creating a strike-out text-markup annotation. Draws a horizontal line through the vertical middle of the rectangle.
StrokeStyleStroke styling for vector paths.
SvgImageOptionsOptions for rendering SVG vector graphics on a page.
TableCellBordersPer-edge borders for a single table cell, overriding (and drawn on top of) the table-level TableOptions.borders. Each side accepts true (draw with the default gray/0.75 line) or a TableCellBorderSide for an explicit color and width. Set borders on a row's cells to rule that row.
TableCellBorderSideStyling for one edge of a table cell. width defaults to 0.75; color defaults to a medium gray.
TableCellDefinitionDetailed table cell object with span, header, scope, and structure options.
TableOptionsOptions for rendering tagged tables.
TemplateAutoOutlineOptionsTop-level options for rendering a reusable document template.
TemplateBlockControlsPagination controls carried by every template block. Applied by the document-level template paginator (PdfDocument.renderTemplate). Merged into TemplateBlock by intersection so each block type gains them without redeclaring.
TemplateCheckBoxBlockTemplate block for rendering a checkbox form field.
TemplateChoiceFieldBlockTemplate block for rendering a choice form field.
TemplateCodeBlockTemplate block for rendering a preformatted code block: monospaced text with indentation and hard line breaks preserved, drawn on a background band that repeats on each page or column the block spans.
TemplateCrossRefBlockTemplate block that renders a cross-reference to a named TemplateBlockControls.anchor elsewhere in the document. The target page number is resolved after the whole document is laid out, so a reference may point forward or backward.
TemplateCrossRefOptionsOptions for a cross-reference block.
TemplateCustomBlockTemplate block for user-defined rendering and estimation logic.
TemplateDocumentOptionsTop-level options for rendering template blocks into a complete document.
TemplateFreeTextBlockTemplate block for rendering a free-text annotation.
TemplateHeadingBlockTemplate block for rendering a heading.
TemplateHighlightBlockTemplate block for rendering a highlight annotation.
TemplateHtmlBlockTemplate block that converts an HTML fragment into blocks at render time. Expanded before pagination, so the headings inside it still feed the TOC and auto-outline and every generated block paginates normally.
TemplateImageBlockTemplate block for rendering a PNG, JPEG, BMP, JBIG2, TIFF, or JPEG2000 image.
TemplateLinkBlockTemplate block for rendering a URI link.
TemplateListBlockTemplate block for rendering a tagged list.
TemplateNoteBlockTemplate block for rendering a text note annotation.
TemplatePageBreakBlockTemplate block that forces a new page.
TemplatePageLinkBlockTemplate block for rendering a page-to-page link annotation.
TemplatePageNumberOptionsOptions for automatic page-number rendering in templates.
TemplatePageOptionsPage layout options used by template rendering.
TemplateParagraphBlockTemplate block for rendering a paragraph.
TemplatePathBlockTemplate block for rendering vector path commands.
TemplatePushButtonBlockTemplate block for rendering a push-button form field.
TemplateRadioGroupBlockTemplate block for rendering a radio-button group form field.
TemplateRectBlockTemplate block for rendering a rectangle.
TemplateRenderContextContext passed to template header, footer, and page-number callbacks.
TemplateRichParagraphBlockTemplate block for rendering a paragraph of inline rich-text runs, mixing fonts, weights, sizes, colors, and links on the same wrapping lines.
TemplateSectionBlockTemplate block that groups child blocks under a structure container.
TemplateSignatureFieldBlockTemplate block for rendering a signature form field.
TemplateStrictLayoutOptionsStrict layout options for templates that must fail instead of overflowing.
TemplateStyleA 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.
TemplateStylesheetNamed styles applied to template blocks. Keys are either type selectors matching a block's type ("paragraph", "table", "link", "list", "code", "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.
TemplateTableBlockTemplate block for rendering a table.
TemplateTextFieldBlockTemplate block for rendering a text form field.
TemplateTocBlockTemplate block that renders a table of contents from the document's top-level heading blocks. Entries are collected from the surrounding template's headings (up to maxLevel); page numbers and links are resolved after the whole document has been laid out, so a TOC may appear before the content it references.
TemplateTocEntryStylePer-heading-level style overrides for TOC entries. Keyed by level (1-6); unset fields fall back to the TOC's base options.
TemplateTocOptionsOptions for a table-of-contents block.
TemplateWatermarkOptionsOptions for a document watermark drawn behind every page's content.
TextBlockOptionsOptions for laying out wrapped text blocks.
TextDefaultsDocument-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.
TextFieldOptionsOptions for creating a text form field.
TextMetricsMeasured size of a single line of text.
TextOptionsOptions for placing a single line of text.
TextShaperInterface for pluggable text shaping engines.
TiffImageOptionsOptions for placing TIFF images on a page.
TransformAffine transform tuple used for graphics and text placement.
UnderlineAnnotationOptionsOptions 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).
UriLinkOptionsOptions for creating an external URI link annotation.
VeraPdfValidateOptionsOptions for validateWithVeraPdf.
VeraPdfValidateResultResult of validateWithVeraPdf.
WebpImageOptionsOptions for placing WebP images on a page.
XmpMetadataOptionsStructured XMP metadata fields used to build an XMP packet.

Type Aliases

Type AliasDescription
AnnotTagOrArtifactAnnotation structure tag, or an artifact marker.
BinaryDataBinary input accepted by the library.
BlockAlignHorizontal alignment of a block inside its column.
BuiltInPageSizeNames of page-size presets that can be passed anywhere a PageSize is accepted.
ChoiceFieldModeChoice field display mode for list boxes and combo boxes.
ClassNameInputA single class name or a list of them.
ColorInputA color accepted by drawing and text APIs: a structured PdfColor or a NamedColor string (resolved to RGB during normalization).
DocumentConformanceProfileSupported document conformance profiles for PDF/A and PDF/UA output.
DocumentEncryptionAlgorithmSupported password-encryption algorithms for generated PDFs.
FlowMarginShorthandCSS-like margin shorthand accepted by flow and template APIs.
FontName-
FontSlotSourceFont slot value: an embedded font handle or raw font bytes.
FontSourceA font file source understood by the high-level font API.
HeadingLevelHeading levels supported by flow-authored tagged content.
ImageClipShape an image is clipped to within its box.
ImageFitHow an image fills its placement box. See ImageFitOptions.fit.
ImageOptionsOptions for the auto-detecting PdfPage.image method. The raster format (PNG, JPEG, GIF, BMP, TIFF, WebP, JPEG 2000) is sniffed from the data.
ImagePositionAlignment of an image within its box for contain/cover.
JsonBinarySourceA binary asset source. path and url require Node 18+/a fetch-capable runtime.
JsonBlockA block in blocks: a flow template block (image blocks use src). Add a BlockPosition to any positionable block (paragraph, an image, rect, textField, checkBox, signatureField) to place it at absolute coordinates instead of flowing.
JsonFontSourceA font face source. Adds Google Fonts loading on top of JsonBinarySource.
LineCapLine-cap styles for stroked vector paths.
LineJoinLine-join styles for stroked vector paths.
LinkTagOrArtifactLink structure tag, or an artifact marker.
ListItemInput shape for list items accepted by page list rendering.
MeasureRichTextOptionsOptions for PdfDocument.measureRichText (position-independent).
MeasureTextBlockOptionsOptions for PdfDocument.measureTextBlock (position-independent).
MeasureTextOptionsOptions for PdfDocument.measureText (position-independent).
NamedColorNamed colors accepted anywhere a ColorInput is expected.
PageLabelStyleSupported page-label numbering styles.
PageSizeEither a built-in page-size name or explicit custom page dimensions.
ParagraphTextAnnotationInline annotation anchored to a substring of a paragraph's rendered text.
PathCommandUnion of vector path commands accepted by page path drawing.
PdfBlendModePDF blend mode names defined in ISO 32000-2 § 11.3.5.
PdfBoundingBoxBounding box tuple in PDF coordinates: left, bottom, right, top.
PdfColor-
PdfContainerTagStandard structure tags that can contain other tagged PDF elements.
PdfEditableStructureElementEditable structure element API for changing roles, alt text, language, and order.
PdfFigureStructureTagStandard structure tags for figure-like content.
PdfFontFont value accepted by text APIs: a built-in FontName, an embedded font handle, or the name of a family registered with PdfDocument.registerFontFamily.
PdfRoleMapMapping from custom structure roles to standard PDF structure roles.
PdfStandardStructureTagUnion of standard PDF structure tags supported by the library.
PdfStructureAttributeValueValues accepted in tagged PDF structure attribute dictionaries.
PdfStructureTagAny supported standard, custom, or artifact structure tag.
PdfTextStructureTagStandard structure tags for text-like tagged PDF content.
ProcessColorProcess color used as the alternate color space for a Separation or DeviceN tint transform.
TableBorderStyleSelects which border lines a table draws.
TableCellInput shape accepted for individual table cells.
TableCellBorderInputTable cell border: true for the default rule, or an explicit side spec.
TableHeaderScopeHeader scope values for tagged table header cells.
TableRowInput shape accepted for table rows.
TemplateBlockUnion of block types accepted by template rendering.
TemplatePageNumberAlignAlignment values supported by template page-number output.
TemplateRunningRegionCallback type for template headers and footers.
TextAlignHorizontal text alignment values.
TextDirectionText direction options, including automatic RTL detection.
TextRenderModeGlyph painting mode (the PDF Tr text rendering operator): - "fill" — fill glyphs with the text color (default). - "stroke" — outline glyphs with the stroke color/width (no fill). - "fillStroke" — fill and outline. - "invisible" — render nothing (e.g. text over a scanned image for search).
TextTagOrArtifactText structure tag, or an artifact marker excluding it from the tag tree.
VerticalAlignVertical alignment of content within a box of known height (a table cell or a text block given an explicit height).
WritingModeText flow direction of a block.
XmpMetadataInputXMP metadata input accepted by document metadata APIs.

Variables

VariableDescription
PAGE_SIZESBuilt-in page size presets expressed in PDF points, keyed by the supported page-size names.

Functions

FunctionDescription
appendPagesAppends selected pages from one PDF to the end of another PDF and returns the updated document bytes.
cmConverts centimetres to points (1 cm = 72 / 2.54 pt).
cmykCreates a CMYK color object using normalized channel values from 0 to 1.
colorResolves a NamedColor to an RGB color. Also accepts a #RGB/#RRGGBB hex string. Throws PdfErrorCode.INVALID_COLOR for an unknown name.
createDocumentCreates a new PDF document builder for generating pages, text, graphics, forms, metadata, tagging, and attachments.
decodeHtmlEntitiesDecodes character references, including the double-encoded (&amp;lt;) output that HTML-in-a-database pipelines routinely produce. Decoding repeats while it keeps changing, bounded so &amp;amp;amp; cannot spin.
deviceNCreates a DeviceN (multi-ink spot) color.
editDocumentOpens an existing PDF for incremental edits such as appending pages, updating fields, changing structure metadata, and preserving existing bytes when possible.
extractPagesCreates a new PDF containing only the selected pages from an existing document.
foldToAsciiFolds characters the built-in (ASCII-only) fonts cannot encode: the explicit map above first, then Unicode decomposition to strip accents, so Muñoz and café survive with base-14 fonts.
grayCreates a grayscale color object using a normalized value from 0 for black to 1 for white.
hexCreates an RGB color object from a CSS-style #RGB or #RRGGBB hex string.
hslCreates a color from HSL. Converted to an RgbColor for output (HSL is not a native PDF color space).
htmlToBlocksConverts an HTML fragment or document into template blocks.
inchConverts inches to points (1 in = 72 pt).
loadExtensionFont-
loadExtensionFontBytes-
loadExtensionFontFaces-
loadGoogleFontDownloads a Google Font and returns its raw TrueType/OpenType bytes, ready to pass to PdfDocument.embedTrueTypeFont or as a face in PdfDocument.registerFontFamily.
mergeDocumentsCombines multiple PDF documents into a single PDF in the order provided.
mmConverts millimetres to points (1 mm = 72 / 25.4 pt).
parseDocumentParses PDF bytes into an inspection object for metadata, pages, forms, outlines, attachments, and structure information.
parseVeraPdfReportExtracts the compliant flag and failed-rule issues from a veraPDF JSON report. Parsing is defensive: veraPDF's schema has shifted across releases, so every level is accessed optionally and unknown shapes degrade gracefully.
ptIdentity converter for points. Provided for symmetry with mm, cm, and inch so unit intent stays explicit at call sites.
renderDocumentJsonRenders a PdfDocumentJson to PDF bytes. Asynchronous because fonts and images may be loaded from the filesystem, a URL, or Google Fonts.
renderDocumentJsonSyncSynchronous variant of renderDocumentJson. Only inline base64 font and image sources are supported — path, url, and google sources throw, because they require asynchronous loading.
rgbCreates an RGB color object using normalized channel values from 0 to 1.
separationCreates a Separation (single-ink spot) color.
splitDocumentSplits a PDF into one single-page PDF byte array per source page.
validatePdf2ConformanceValidates a parsed document for PDF 2.0 features that this library can detect as deprecated or removed.
validateWithVeraPdfValidates PDF bytes with veraPDF when it is installed, falling back to the supplied custom checker issues otherwise.

On this page