# Lamina PDF > Lamina PDF creates, reads, edits and saves PDF files from TypeScript and Rust: one Rust core, run as WebAssembly in browsers, Node, Deno, Bun and Cloudflare Workers (`@laminapdf/sdk`), or natively from the `laminapdf` crate. Positions are top-left points of the displayed page and page indexes start at 0; every error has a stable code with its own page. These docs describe version 0.2.0-alpha.2. Every link is a Markdown page; [llms-full.txt](https://docs.laminapdf.com/llms-full.txt) holds them all in one file. ## Start here - [Lamina PDF](https://docs.laminapdf.com/index.md): Create, read, edit and save PDFs from Rust and TypeScript, with one Rust core that runs natively and as WebAssembly. - [Install](https://docs.laminapdf.com/install.md): Install Lamina PDF from npm or crates.io, and find every published package. - [Your first PDF](https://docs.laminapdf.com/start/first-pdf.md): Write hello.pdf from Node in five minutes. - [Use Lamina PDF with coding agents](https://docs.laminapdf.com/start/coding-agents.md): Point a coding agent at the docs inside the installed package, so its answers match the version you use. ## Your runtime - [Browser and bundlers](https://docs.laminapdf.com/quick-start/browser.md): Load @laminapdf/sdk in a web page through Vite or another bundler. - [Node](https://docs.laminapdf.com/quick-start/node.md): Generate a PDF from Node with @laminapdf/sdk. - [Deno](https://docs.laminapdf.com/quick-start/deno.md): Use @laminapdf/sdk in Deno. - [Bun](https://docs.laminapdf.com/quick-start/bun.md): Use @laminapdf/sdk in Bun. - [Cloudflare Workers](https://docs.laminapdf.com/quick-start/workers.md): Generate PDFs per request in a Cloudflare Worker. - [Rust](https://docs.laminapdf.com/quick-start/rust.md): Generate a PDF with the Lamina PDF crate. ## Concepts - [How Lamina PDF thinks about a PDF](https://docs.laminapdf.com/concepts/how-lamina-thinks.md): Bytes in and out, the same bytes every time, edits kept apart from the opened file, two ways to save, memory you free, three JavaScript modules. - [Pages and coordinates](https://docs.laminapdf.com/concepts/pages-and-coordinates.md): Points from the top-left corner of the page as it's displayed, y going down, and pages numbered from 0. - [Errors and warnings](https://docs.laminapdf.com/concepts/errors-and-warnings.md): One coded error shape on every surface, and warnings for what Lamina PDF repaired. - [What Lamina PDF writes and what it borrows](https://docs.laminapdf.com/concepts/dependencies.md): Lamina PDF writes the parts that decide a PDF's bytes, borrows the rest from permissive projects, and pins and checks everything it borrows. ## Create PDFs - [Text and fonts](https://docs.laminapdf.com/guides/fonts-and-text.md): Draw text in any script with your own fonts or the standard 14, one line at a time or as a paragraph that wraps in a box. - [Shapes, colour and images](https://docs.laminapdf.com/guides/images-and-vectors.md): Draw lines, shapes and images on a page, in any colour, with transparency, clipping and transforms. - [Links, outlines and metadata](https://docs.laminapdf.com/guides/links-outlines-and-metadata.md): Add links, named destinations, an outline, page labels, viewer preferences and metadata to a document. - [Accessible PDFs](https://docs.laminapdf.com/guides/accessible-pdfs.md): Build PDF/UA-1 documents that screen readers can follow, with every machine-checkable rule checked when the builder finishes. - [Archival PDFs](https://docs.laminapdf.com/guides/archival-pdfs.md): Build PDF/A-2b, PDF/A-2u and PDF/A-3b documents that look the same in years to come, and attach files such as an e-invoice's XML. ## Read and edit PDFs - [Edit a PDF](https://docs.laminapdf.com/guides/edit-a-pdf.md): Change an existing PDF in transactions you can undo, and replay edits stored as JSON. - [Save a PDF](https://docs.laminapdf.com/guides/save-a-pdf.md): Save edits as a revision appended to the original bytes or as a whole new file, and see when a file refuses a save. - [Open password-protected files](https://docs.laminapdf.com/guides/password-protected-files.md): Open PDFs that need a password, ask again when it is missing or wrong, and save them afterwards. - [Open files you don't trust](https://docs.laminapdf.com/guides/untrusted-files.md): Cap how much work an uploaded PDF can make Lamina PDF do, and refuse damaged files with strict mode. ## Production - [Keep the page responsive](https://docs.laminapdf.com/guides/keep-the-page-responsive.md): Run Lamina PDF in a Web Worker with @laminapdf/sdk/worker, so a large file never freezes the page. ## Recipes - [Recipes](https://docs.laminapdf.com/recipes.md): Complete Lamina PDF programs, from one page of text to an archived invoice, each with its code and the PDF it writes. - [Hello, world](https://docs.laminapdf.com/recipes/hello.md): One A4 page with a line of text in a standard 14 font, the smallest PDF Lamina PDF writes, in TypeScript and Rust. - [An invoice](https://docs.laminapdf.com/recipes/invoice.md): A tagged one-page invoice with an embedded font, a table of line items with right-aligned amounts and a total, in TypeScript and Rust. - [Multilingual text](https://docs.laminapdf.com/recipes/multilingual.md): Latin, Arabic, Devanagari, Hebrew and Chinese on one page, each in its own embedded font, as a shaped line and a wrapped paragraph. - [Images and vectors](https://docs.laminapdf.com/recipes/images-and-vectors.md): Shapes, a dashed curve, gray, RGB, CMYK and hex colour, transparency, a blend mode, a clip, a rotation, a JPEG and an RGBA image on one page. - [Links and outlines](https://docs.laminapdf.com/recipes/links-and-outlines.md): Four A5 pages joined by web, page and named links, with a nested outline, page labels that read i, ii, 1, 2 and the outline shown on open. - [Generate, then edit](https://docs.laminapdf.com/recipes/generate-then-edit.md): Build a one-page draft, open its bytes, retitle it in one transaction and save the edit as a revision after the original bytes. - [Extract text for an LLM](https://docs.laminapdf.com/recipes/extract-markdown.md): Turn a PDF into Markdown in reading order, JSON with a box for every block, and chunks sized for retrieval, in TypeScript and Rust. - [A PDF/UA report](https://docs.laminapdf.com/recipes/pdf-ua-report.md): A one-page sales report a screen reader can follow, with headings, a table, a described chart and a link, checked against PDF/UA-1 as it's built. - [A PDF/A archive](https://docs.laminapdf.com/recipes/pdf-a-archive.md): An order confirmation for long-term archiving, written as PDF/A-2b and as PDF/A-2u that is also PDF/UA-1, with an embedded font and a photo. - [A PDF/A-3 invoice with XML](https://docs.laminapdf.com/recipes/pdf-a3-invoice-with-xml.md): A PDF/A-3b invoice that carries the same invoice as an attached XML file, for people to read and for software to process. - [A 100-page report](https://docs.laminapdf.com/recipes/report.md): A 100-page A4 report with two embedded fonts and a table on every page, the document Lamina PDF times in each JavaScript runtime. - [Open someone else's file](https://docs.laminapdf.com/recipes/open-untrusted.md): Open an uploaded PDF with an optional password and tighter limits, and get its page count and warnings, or the error, back as a value. - [Save in a Web Worker](https://docs.laminapdf.com/recipes/web-worker-client.md): Open and save a PDF in a Web Worker, so a large file never freezes the page, with progress as it saves and a signal that stops the work. - [A Cloudflare Worker](https://docs.laminapdf.com/recipes/cloudflare-worker.md): A Cloudflare Worker that returns a one-page letter per request, in a standard 14 font or a bundled one, and a 400 for a name the font can't draw. ## Troubleshooting - [Troubleshooting](https://docs.laminapdf.com/troubleshooting.md): The problems people hit with Lamina PDF, from a missing init() to a signed file that won't save, with the cause and the fix of each. ## Reference - [Rust API (rustdoc)](https://docs.laminapdf.com/reference/rust.md): Where to read the API documentation of the Lamina PDF crates. - [Error and warning codes](https://docs.laminapdf.com/reference/codes.md): Every code Lamina PDF raises, generated from fixtures/codes.json when the site is built. - [Stability policy](https://docs.laminapdf.com/reference/stability.md): What a Lamina PDF version number promises, and what stays the same in every version. - [Changelog](https://docs.laminapdf.com/reference/changelog.md): What changed in each Lamina PDF release, newest first. - [Glossary](https://docs.laminapdf.com/reference/glossary.md): The PDF and Lamina PDF terms the docs use, each in a sentence or two. ## API reference - [Builder](https://docs.laminapdf.com/reference/sdk/classes/builder.md) - [Document](https://docs.laminapdf.com/reference/sdk/classes/document.md) - [Font](https://docs.laminapdf.com/reference/sdk/classes/font.md) - [Image](https://docs.laminapdf.com/reference/sdk/classes/image.md) - [LaminaPdfError](https://docs.laminapdf.com/reference/sdk/classes/laminapdferror.md) - [Page](https://docs.laminapdf.com/reference/sdk/classes/page.md) - [PageRef](https://docs.laminapdf.com/reference/sdk/classes/pageref.md) - [PageText](https://docs.laminapdf.com/reference/sdk/classes/pagetext.md) - [PageTextRun](https://docs.laminapdf.com/reference/sdk/classes/pagetextrun.md) - [PendingPath](https://docs.laminapdf.com/reference/sdk/classes/pendingpath.md) - [SaveJob](https://docs.laminapdf.com/reference/sdk/classes/savejob.md) - [Surface](https://docs.laminapdf.com/reference/sdk/classes/surface.md) - [Transaction](https://docs.laminapdf.com/reference/sdk/classes/transaction.md) - [callbackSource](https://docs.laminapdf.com/reference/sdk/functions/callbacksource.md) - [httpRangeSource](https://docs.laminapdf.com/reference/sdk/functions/httprangesource.md) - [init](https://docs.laminapdf.com/reference/sdk/functions/init.md) - [isExtractLoaded](https://docs.laminapdf.com/reference/sdk/functions/isextractloaded.md) - [isInitialized](https://docs.laminapdf.com/reference/sdk/functions/isinitialized.md) - [isLaminaPdfError](https://docs.laminapdf.com/reference/sdk/functions/islaminapdferror.md) - [isTextLoaded](https://docs.laminapdf.com/reference/sdk/functions/istextloaded.md) - [loadExtract](https://docs.laminapdf.com/reference/sdk/functions/loadextract.md) - [loadText](https://docs.laminapdf.com/reference/sdk/functions/loadtext.md) - [onLeak](https://docs.laminapdf.com/reference/sdk/functions/onleak.md) - [reset](https://docs.laminapdf.com/reference/sdk/functions/reset.md) - [wasmMemory](https://docs.laminapdf.com/reference/sdk/functions/wasmmemory.md) - [BuilderOptions](https://docs.laminapdf.com/reference/sdk/interfaces/builderoptions.md) - [ByteRange](https://docs.laminapdf.com/reference/sdk/interfaces/byterange.md) - [ChunkOptions](https://docs.laminapdf.com/reference/sdk/interfaces/chunkoptions.md) - [Diagnostic](https://docs.laminapdf.com/reference/sdk/interfaces/diagnostic.md) - [ExtractOptions](https://docs.laminapdf.com/reference/sdk/interfaces/extractoptions.md) - [ExtractResult](https://docs.laminapdf.com/reference/sdk/interfaces/extractresult.md) - [FontInfo](https://docs.laminapdf.com/reference/sdk/interfaces/fontinfo.md) - [HttpRangeOptions](https://docs.laminapdf.com/reference/sdk/interfaces/httprangeoptions.md) - [InitOptions](https://docs.laminapdf.com/reference/sdk/interfaces/initoptions.md) - [Leak](https://docs.laminapdf.com/reference/sdk/interfaces/leak.md) - [Location](https://docs.laminapdf.com/reference/sdk/interfaces/location.md) - [OpenOptions](https://docs.laminapdf.com/reference/sdk/interfaces/openoptions.md) - [OpLog](https://docs.laminapdf.com/reference/sdk/interfaces/oplog.md) - [PageTextOptions](https://docs.laminapdf.com/reference/sdk/interfaces/pagetextoptions.md) - [PathBuilder](https://docs.laminapdf.com/reference/sdk/interfaces/pathbuilder.md) - [QuadPoint](https://docs.laminapdf.com/reference/sdk/interfaces/quadpoint.md) - [RangeOptions](https://docs.laminapdf.com/reference/sdk/interfaces/rangeoptions.md) - [RangeSource](https://docs.laminapdf.com/reference/sdk/interfaces/rangesource.md) - [StrokeStyle](https://docs.laminapdf.com/reference/sdk/interfaces/strokestyle.md) - [TagSpec](https://docs.laminapdf.com/reference/sdk/interfaces/tagspec.md) - [TextBoxOptions](https://docs.laminapdf.com/reference/sdk/interfaces/textboxoptions.md) - [TextGlyph](https://docs.laminapdf.com/reference/sdk/interfaces/textglyph.md) - [TextOptions](https://docs.laminapdf.com/reference/sdk/interfaces/textoptions.md) - [WasmMemory](https://docs.laminapdf.com/reference/sdk/interfaces/wasmmemory.md) - [@laminapdf/sdk](https://docs.laminapdf.com/reference/sdk/readme.md) - [AfRelationship](https://docs.laminapdf.com/reference/sdk/type-aliases/afrelationship.md) - [Align](https://docs.laminapdf.com/reference/sdk/type-aliases/align.md) - [ArtifactKind](https://docs.laminapdf.com/reference/sdk/type-aliases/artifactkind.md) - [AttachmentOptions](https://docs.laminapdf.com/reference/sdk/type-aliases/attachmentoptions.md) - [BlendMode](https://docs.laminapdf.com/reference/sdk/type-aliases/blendmode.md) - [BoxRect](https://docs.laminapdf.com/reference/sdk/type-aliases/boxrect.md) - [BuildOptions](https://docs.laminapdf.com/reference/sdk/type-aliases/buildoptions.md) - [Cell](https://docs.laminapdf.com/reference/sdk/type-aliases/cell.md) - [Chunk](https://docs.laminapdf.com/reference/sdk/type-aliases/chunk.md) - [Color](https://docs.laminapdf.com/reference/sdk/type-aliases/color.md) - [Coordinates](https://docs.laminapdf.com/reference/sdk/type-aliases/coordinates.md) - [Direction](https://docs.laminapdf.com/reference/sdk/type-aliases/direction.md) - [DocumentInfo](https://docs.laminapdf.com/reference/sdk/type-aliases/documentinfo.md) - [Dropped](https://docs.laminapdf.com/reference/sdk/type-aliases/dropped.md) - [DropReason](https://docs.laminapdf.com/reference/sdk/type-aliases/dropreason.md) - [Edited](https://docs.laminapdf.com/reference/sdk/type-aliases/edited.md) - [ErrorCode](https://docs.laminapdf.com/reference/sdk/type-aliases/errorcode.md) - [ErrorKind](https://docs.laminapdf.com/reference/sdk/type-aliases/errorkind.md) - [ExtractedBlock](https://docs.laminapdf.com/reference/sdk/type-aliases/extractedblock.md) - [ExtractedPage](https://docs.laminapdf.com/reference/sdk/type-aliases/extractedpage.md) - [ExtractedSource](https://docs.laminapdf.com/reference/sdk/type-aliases/extractedsource.md) - [ExtractFormat](https://docs.laminapdf.com/reference/sdk/type-aliases/extractformat.md) - [Extraction](https://docs.laminapdf.com/reference/sdk/type-aliases/extraction.md) - [FillRule](https://docs.laminapdf.com/reference/sdk/type-aliases/fillrule.md) - [Fit](https://docs.laminapdf.com/reference/sdk/type-aliases/fit.md) - [Flags](https://docs.laminapdf.com/reference/sdk/type-aliases/flags.md) - [Generator](https://docs.laminapdf.com/reference/sdk/type-aliases/generator.md) - [GlyphQuad](https://docs.laminapdf.com/reference/sdk/type-aliases/glyphquad.md) - [InfoPatch](https://docs.laminapdf.com/reference/sdk/type-aliases/infopatch.md) - [LaminaPdfWarning](https://docs.laminapdf.com/reference/sdk/type-aliases/laminapdfwarning.md) - [LimitName](https://docs.laminapdf.com/reference/sdk/type-aliases/limitname.md) - [Limits](https://docs.laminapdf.com/reference/sdk/type-aliases/limits.md) - [LineBox](https://docs.laminapdf.com/reference/sdk/type-aliases/linebox.md) - [LineCap](https://docs.laminapdf.com/reference/sdk/type-aliases/linecap.md) - [LineJoin](https://docs.laminapdf.com/reference/sdk/type-aliases/linejoin.md) - [LinkTarget](https://docs.laminapdf.com/reference/sdk/type-aliases/linktarget.md) - [Metadata](https://docs.laminapdf.com/reference/sdk/type-aliases/metadata.md) - [Op](https://docs.laminapdf.com/reference/sdk/type-aliases/op.md) - [OutlineEntry](https://docs.laminapdf.com/reference/sdk/type-aliases/outlineentry.md) - [Overflow](https://docs.laminapdf.com/reference/sdk/type-aliases/overflow.md) - [PageInfo](https://docs.laminapdf.com/reference/sdk/type-aliases/pageinfo.md) - [PageLabel](https://docs.laminapdf.com/reference/sdk/type-aliases/pagelabel.md) - [PageSizeName](https://docs.laminapdf.com/reference/sdk/type-aliases/pagesizename.md) - [Point](https://docs.laminapdf.com/reference/sdk/type-aliases/point.md) - [Profile](https://docs.laminapdf.com/reference/sdk/type-aliases/profile.md) - [Progress](https://docs.laminapdf.com/reference/sdk/type-aliases/progress.md) - [Rect](https://docs.laminapdf.com/reference/sdk/type-aliases/rect.md) - [Region](https://docs.laminapdf.com/reference/sdk/type-aliases/region.md) - [RenderMode](https://docs.laminapdf.com/reference/sdk/type-aliases/rendermode.md) - [Rotation](https://docs.laminapdf.com/reference/sdk/type-aliases/rotation.md) - [SaveOptions](https://docs.laminapdf.com/reference/sdk/type-aliases/saveoptions.md) - [SaveReport](https://docs.laminapdf.com/reference/sdk/type-aliases/savereport.md) - [Span](https://docs.laminapdf.com/reference/sdk/type-aliases/span.md) - [Standard14](https://docs.laminapdf.com/reference/sdk/type-aliases/standard14.md) - [StructRef](https://docs.laminapdf.com/reference/sdk/type-aliases/structref.md) - [StructSource](https://docs.laminapdf.com/reference/sdk/type-aliases/structsource.md) - [TableDetector](https://docs.laminapdf.com/reference/sdk/type-aliases/tabledetector.md) - [TableScope](https://docs.laminapdf.com/reference/sdk/type-aliases/tablescope.md) - [Tag](https://docs.laminapdf.com/reference/sdk/type-aliases/tag.md) - [TagName](https://docs.laminapdf.com/reference/sdk/type-aliases/tagname.md) - [TextLayout](https://docs.laminapdf.com/reference/sdk/type-aliases/textlayout.md) - [TextRange](https://docs.laminapdf.com/reference/sdk/type-aliases/textrange.md) - [TextRunInfo](https://docs.laminapdf.com/reference/sdk/type-aliases/textruninfo.md) - [Transform](https://docs.laminapdf.com/reference/sdk/type-aliases/transform.md) - [UndoOutcome](https://docs.laminapdf.com/reference/sdk/type-aliases/undooutcome.md) - [ViewerPreferences](https://docs.laminapdf.com/reference/sdk/type-aliases/viewerpreferences.md) - [WarningCode](https://docs.laminapdf.com/reference/sdk/type-aliases/warningcode.md) - [WasmSource](https://docs.laminapdf.com/reference/sdk/type-aliases/wasmsource.md) - [Matrix](https://docs.laminapdf.com/reference/sdk/variables/matrix.md) - [PAGE_SIZES](https://docs.laminapdf.com/reference/sdk/variables/page_sizes.md) - [TAG_NAMES](https://docs.laminapdf.com/reference/sdk/variables/tag_names.md) ## Optional - [aes-padding-invalid](https://docs.laminapdf.com/reference/codes/aes-padding-invalid.md): AES-encrypted data had a bad length or padding and was kept as stored - [already-initialized](https://docs.laminapdf.com/reference/codes/already-initialized.md): init() or loadText() named a different source for a module that is already loaded or loading - [binary-output-to-terminal](https://docs.laminapdf.com/reference/codes/binary-output-to-terminal.md): the command would write a PDF to standard output, and standard output is a terminal - [builder-finished](https://docs.laminapdf.com/reference/codes/builder-finished.md): a builder or one of its pages was used after it finished - [cancelled](https://docs.laminapdf.com/reference/codes/cancelled.md): a CancelToken stopped the work; the job is finished and returned no partial result - [cmap-invalid](https://docs.laminapdf.com/reference/codes/cmap-invalid.md): a font's CMap or ToUnicode CMap is malformed or names a predefined CMap Lamina PDF has no table for - [collection-index](https://docs.laminapdf.com/reference/codes/collection-index.md): a font collection member past the end of the collection was asked for - [color-components](https://docs.laminapdf.com/reference/codes/color-components.md): a colour has the wrong number of components for its colour space - [content-bad-operands](https://docs.laminapdf.com/reference/codes/content-bad-operands.md): an operator had too few operands or operands of the wrong type, or extra ones - [content-path-unpainted](https://docs.laminapdf.com/reference/codes/content-path-unpainted.md): a content stream ended with a path no painting operator ended - [content-resource-missing](https://docs.laminapdf.com/reference/codes/content-resource-missing.md): an operator named a resource that is missing, of the wrong type or unreadable - [content-syntax](https://docs.laminapdf.com/reference/codes/content-syntax.md): content-stream bytes that are not a token were skipped - [content-unbalanced-bt](https://docs.laminapdf.com/reference/codes/content-unbalanced-bt.md): a text object was opened twice, closed outside one, or left open - [content-unbalanced-marked](https://docs.laminapdf.com/reference/codes/content-unbalanced-marked.md): an EMC without a matching BMC or BDC was ignored, or marked content was left open - [content-unbalanced-q](https://docs.laminapdf.com/reference/codes/content-unbalanced-q.md): a Q without a matching q was ignored, or saved graphics states were left open - [content-unknown-operator](https://docs.laminapdf.com/reference/codes/content-unknown-operator.md): an operator the spec does not define was skipped outside a BX/EX section - [data-pending](https://docs.laminapdf.com/reference/codes/data-pending.md): the ByteSource has not fetched the byte ranges the call needs yet - [decompress](https://docs.laminapdf.com/reference/codes/decompress.md): compressed stream data was corrupt - [device-color-without-output-intent](https://docs.laminapdf.com/reference/codes/device-color-without-output-intent.md): a DeviceCMYK colour or image was used, but the PDF/A output intent is sRGB - [direct-page](https://docs.laminapdf.com/reference/codes/direct-page.md): the page is a direct dictionary, which ops cannot edit yet - [disposed](https://docs.laminapdf.com/reference/codes/disposed.md): a document, builder or other handle was used after free(), or after the using block that held it ended - [document-changed](https://docs.laminapdf.com/reference/codes/document-changed.md): the document a job was created for changed (an edit, undo, redo, save or rebase) or a different document was passed to step - [embedded-file-forbidden](https://docs.laminapdf.com/reference/codes/embedded-file-forbidden.md): PDF/A-2 doesn't allow attached files that aren't PDF/A themselves - [embedded-file-without-mime-type](https://docs.laminapdf.com/reference/codes/embedded-file-without-mime-type.md): an attached file has no MIME type, which every PDF/A profile requires - [encoding-full](https://docs.laminapdf.com/reference/codes/encoding-full.md): a standard 14 font has no free one-byte code left for another glyph - [encrypted-base](https://docs.laminapdf.com/reference/codes/encrypted-base.md): a save of an encrypted document was requested - [extract-limit-blocks](https://docs.laminapdf.com/reference/codes/extract-limit-blocks.md): a page had more runs of text than the extraction block limit; the runs past it were left out - [extract-module-not-loaded](https://docs.laminapdf.com/reference/codes/extract-module-not-loaded.md): page.text() was called on a document opened in the base module, which has no text extraction - [extract-reading-order-ambiguous](https://docs.laminapdf.com/reference/codes/extract-reading-order-ambiguous.md): a page mixes horizontal and vertical writing, so the order of its blocks is a guess - [extract-struct-tree-ignored](https://docs.laminapdf.com/reference/codes/extract-struct-tree-ignored.md): a tagged page's structure tree covered too little of its text, or its order jumped back across columns too often, so the layout gave the reading order - [extract-table-ambiguous](https://docs.laminapdf.com/reference/codes/extract-table-ambiguous.md): a table's rules marked out merged cells that aren't rectangles, so its cells were kept unmerged - [extract-table-limit](https://docs.laminapdf.com/reference/codes/extract-table-limit.md): a page's ruling lines would make a table bigger than the extraction's cell limit; those lines gave no table - [extract-untagged-content](https://docs.laminapdf.com/reference/codes/extract-untagged-content.md): a page read in structure-tree order has visible text that is neither in the tree nor an artifact; it follows the tree's blocks, in layout order - [fetch-failed](https://docs.laminapdf.com/reference/codes/fetch-failed.md): a range source could not fetch input bytes: a network error, an HTTP status other than 200 and 206, a 206 whose Content-Range or length doesn't match the request, or a read that returned the wrong number of bytes - [flate-truncated](https://docs.laminapdf.com/reference/codes/flate-truncated.md): Flate data was truncated or had a bad checksum; the partial output was kept - [font-invalid](https://docs.laminapdf.com/reference/codes/font-invalid.md): a font dictionary has a missing or malformed entry, so its text was decoded with defaults - [font-mismatch](https://docs.laminapdf.com/reference/codes/font-mismatch.md): a shaped run was given with a font key for a different font than it was shaped with - [font-not-embeddable](https://docs.laminapdf.com/reference/codes/font-not-embeddable.md): the font's OS/2 fsType forbids embedding - [font-not-embedded](https://docs.laminapdf.com/reference/codes/font-not-embedded.md): a standard 14 font, which is never embedded, was used under a profile that needs every font embedded - [font-not-shapable](https://docs.laminapdf.com/reference/codes/font-not-shapable.md): a standard 14 font was given to shaping or layout, which need a font program - [glyph-out-of-range](https://docs.laminapdf.com/reference/codes/glyph-out-of-range.md): a glyph ID at or past the font's glyph count was used - [glyph-without-unicode](https://docs.laminapdf.com/reference/codes/glyph-without-unicode.md): a glyph was drawn without a Unicode value, which PDF/A-2u and PDF/UA-1 forbid - [heading-level-skipped](https://docs.laminapdf.com/reference/codes/heading-level-skipped.md): a heading skips a level (the first is not H1, or an H3 follows an H1), which PDF/UA-1 forbids - [image-data-length](https://docs.laminapdf.com/reference/codes/image-data-length.md): raw image samples are not width x height x channels bytes long - [image-too-large](https://docs.laminapdf.com/reference/codes/image-too-large.md): the image needs more memory than the builder allows (a decoded PNG over 256 MiB, or raw dimensions whose size overflows) - [inline-image-unterminated](https://docs.laminapdf.com/reference/codes/inline-image-unterminated.md): no EI ends an inline image; the rest of the content was skipped - [input-unreadable](https://docs.laminapdf.com/reference/codes/input-unreadable.md): an input file, standard input or the password file couldn't be read - [instance-reset](https://docs.laminapdf.com/reference/codes/instance-reset.md): a handle was used after its WebAssembly instance was replaced, by reset() or after a trap - [invalid-argument](https://docs.laminapdf.com/reference/codes/invalid-argument.md): a value passed to a binding does not have the shape its type declares - [invalid-axis-value](https://docs.laminapdf.com/reference/codes/invalid-axis-value.md): a variation axis value was NaN or infinite - [invalid-box](https://docs.laminapdf.com/reference/codes/invalid-box.md): a page boundary box is not four numbers and reads as absent - [invalid-color](https://docs.laminapdf.com/reference/codes/invalid-color.md): a colour string is not of the form #rgb or #rrggbb - [invalid-command-line](https://docs.laminapdf.com/reference/codes/invalid-command-line.md): the command line doesn't parse: an unknown command or flag, a missing argument, a bad value, or stdin named twice - [invalid-date](https://docs.laminapdf.com/reference/codes/invalid-date.md): an Info date is not a valid PDF date; the raw string is kept - [invalid-entry](https://docs.laminapdf.com/reference/codes/invalid-entry.md): an entry a view reads is unreadable or of the wrong type and reads as absent - [invalid-feature](https://docs.laminapdf.com/reference/codes/invalid-feature.md): an OpenType feature setting did not parse - [invalid-font](https://docs.laminapdf.com/reference/codes/invalid-font.md): font bytes could not be read as a font - [invalid-geometry](https://docs.laminapdf.com/reference/codes/invalid-geometry.md): a page size, box, /UserUnit, drawing value (coordinate, matrix, line width, dash, miter limit) or image size is not usable - [invalid-icc-profile](https://docs.laminapdf.com/reference/codes/invalid-icc-profile.md): the bytes are not a usable ICC profile - [invalid-image](https://docs.laminapdf.com/reference/codes/invalid-image.md): image bytes are not a readable image of the format they were given as - [invalid-op-log](https://docs.laminapdf.com/reference/codes/invalid-op-log.md): an op log does not parse: an unknown op or field, a bad value, or not JSON - [invalid-page-label](https://docs.laminapdf.com/reference/codes/invalid-page-label.md): a /PageLabels entry is malformed; the malformed part is dropped - [invalid-page-labels](https://docs.laminapdf.com/reference/codes/invalid-page-labels.md): page label ranges that don't start at page 0, don't increase, start past the last page or number from 0 - [invalid-page-range](https://docs.laminapdf.com/reference/codes/invalid-page-range.md): a page range doesn't fit the grammar, or names a page the document lacks - [invalid-rotate](https://docs.laminapdf.com/reference/codes/invalid-rotate.md): a page's /Rotate is not a multiple of 90 and reads as 0 - [invalid-structure-nesting](https://docs.laminapdf.com/reference/codes/invalid-structure-nesting.md): a table or list element sits in a parent its type doesn't allow (a TD outside a TR, a P directly in a Table) - [invalid-structure](https://docs.laminapdf.com/reference/codes/invalid-structure.md): an object stream, xref section or filter parameter was malformed - [invalid-text-range](https://docs.laminapdf.com/reference/codes/invalid-text-range.md): a byte range was out of bounds or not on character boundaries of the text - [job-finished](https://docs.laminapdf.com/reference/codes/job-finished.md): a job was stepped after it had finished, failed or been cancelled - [limit-exceeded](https://docs.laminapdf.com/reference/codes/limit-exceeded.md): a hard Limits value was exceeded - [link-without-contents](https://docs.laminapdf.com/reference/codes/link-without-contents.md): a link annotation has no description (/Contents), which PDF/UA-1 requires - [link-without-structure](https://docs.laminapdf.com/reference/codes/link-without-structure.md): a link annotation has no Link structure element (it was drawn inside an artifact), which PDF/UA-1 forbids - [missing-alt-text](https://docs.laminapdf.com/reference/codes/missing-alt-text.md): a Figure or Formula has no alternate text (/Alt or /ActualText), which PDF/UA-1 requires - [missing-glyph](https://docs.laminapdf.com/reference/codes/missing-glyph.md): the font has no glyph for a character of the text - [missing-header](https://docs.laminapdf.com/reference/codes/missing-header.md): no %PDF-x.y header in the first 1,024 bytes; parsing went ahead - [missing-lang](https://docs.laminapdf.com/reference/codes/missing-lang.md): PDF/UA-1 needs the document's natural language, and none was set - [missing-root](https://docs.laminapdf.com/reference/codes/missing-root.md): no document catalog (/Root) was found, even after repair - [missing-title](https://docs.laminapdf.com/reference/codes/missing-title.md): PDF/UA-1 needs a document title, and the metadata gives none - [name-tree-node-skipped](https://docs.laminapdf.com/reference/codes/name-tree-node-skipped.md): a name- or number-tree node was malformed, repeated or too deep, and was skipped - [nested-transaction](https://docs.laminapdf.com/reference/codes/nested-transaction.md): a transaction was started, or undo or redo called, while one is open - [no-pending-save](https://docs.laminapdf.com/reference/codes/no-pending-save.md): rebase was called without a save waiting for it - [no-transaction](https://docs.laminapdf.com/reference/codes/no-transaction.md): apply, commit or rollback was called without an open transaction - [not-initialized](https://docs.laminapdf.com/reference/codes/not-initialized.md): an @laminapdf/sdk function was called before init() finished loading the WebAssembly module - [not-pdf](https://docs.laminapdf.com/reference/codes/not-pdf.md): the input does not look like a PDF at all - [not-rebased](https://docs.laminapdf.com/reference/codes/not-rebased.md): the output was written, but rebasing the document onto it failed - [object-number-out-of-range](https://docs.laminapdf.com/reference/codes/object-number-out-of-range.md): an xref entry above max_object_number was dropped - [objstm-index-mismatch](https://docs.laminapdf.com/reference/codes/objstm-index-mismatch.md): an object stream's index was stale and the object was found by searching - [out-of-memory](https://docs.laminapdf.com/reference/codes/out-of-memory.md): the WebAssembly module ran out of memory (its maximum, or what the engine could give), so its instance was discarded and the next call gets a fresh one - [outline-cycle](https://docs.laminapdf.com/reference/codes/outline-cycle.md): an outline item was reached twice; that branch of the walk stopped - [outline-item-skipped](https://docs.laminapdf.com/reference/codes/outline-item-skipped.md): an outline item was missing, not a dictionary or too deep, and was skipped with its subtree - [output-unwritable](https://docs.laminapdf.com/reference/codes/output-unwritable.md): the output couldn't be written: its folder is missing or read-only, the disk is full, or standard output closed - [overwrite-refused](https://docs.laminapdf.com/reference/codes/overwrite-refused.md): the output file exists, or the command would modify its input in place, and --force wasn't given - [page-count-mismatch](https://docs.laminapdf.com/reference/codes/page-count-mismatch.md): the page tree's /Count differs from the number of pages walked - [page-index-out-of-range](https://docs.laminapdf.com/reference/codes/page-index-out-of-range.md): a link, outline item or destination names a page index the document doesn't have - [page-tree-node-skipped](https://docs.laminapdf.com/reference/codes/page-tree-node-skipped.md): a page-tree node was missing, malformed or too deep, and was skipped - [password-required](https://docs.laminapdf.com/reference/codes/password-required.md): the document is encrypted with a user password and none was given - [path-outside-roots](https://docs.laminapdf.com/reference/codes/path-outside-roots.md): laminapdf mcp was given a path outside its --root folders, or a link that leads out of them - [perms-mismatch](https://docs.laminapdf.com/reference/codes/perms-mismatch.md): an R5/R6 document's /Perms does not match its /P and /EncryptMetadata - [profile-version-conflict](https://docs.laminapdf.com/reference/codes/profile-version-conflict.md): the PDF version asked for is one the profile doesn't allow (PDF/UA-1, PDF/A-2 and PDF/A-3 are based on PDF 1.7) - [reference-cycle](https://docs.laminapdf.com/reference/codes/reference-cycle.md): a reference chain or the page tree loops back on itself - [render-backend-unavailable](https://docs.laminapdf.com/reference/codes/render-backend-unavailable.md): the render engine is not available: its library or module could not be loaded - [render-failed](https://docs.laminapdf.com/reference/codes/render-failed.md): the render engine could not open the document or draw the page - [render-too-large](https://docs.laminapdf.com/reference/codes/render-too-large.md): the requested tile is larger than the render limits allow; nothing was allocated - [repaired-base](https://docs.laminapdf.com/reference/codes/repaired-base.md): an incremental update was requested for a document whose xref needed repair - [requires-rewrite](https://docs.laminapdf.com/reference/codes/requires-rewrite.md): an incremental save was requested but only a full rewrite is safe - [saved-not-rebased](https://docs.laminapdf.com/reference/codes/saved-not-rebased.md): the document was saved to a sink Lamina PDF cannot read back and waits for rebase - [sink-not-empty](https://docs.laminapdf.com/reference/codes/sink-not-empty.md): the sink already held bytes before the save started - [sink](https://docs.laminapdf.com/reference/codes/sink.md): the sink failed to take the bytes or could not give them back - [source-budget-exceeded](https://docs.laminapdf.com/reference/codes/source-budget-exceeded.md): a sparse source was given more bytes than its byte budget allows - [source-changed](https://docs.laminapdf.com/reference/codes/source-changed.md): a remote file changed while it was being read: its ETag or length differs from the first response - [source](https://docs.laminapdf.com/reference/codes/source.md): the ByteSource failed to read - [stale-generation](https://docs.laminapdf.com/reference/codes/stale-generation.md): a reference's generation did not match its xref entry, so it resolved to null - [stream-length-recovered](https://docs.laminapdf.com/reference/codes/stream-length-recovered.md): a stream's /Length was wrong, so its end was found by scanning for endstream - [strict](https://docs.laminapdf.com/reference/codes/strict.md): strict mode refused something the tolerant reader would have repaired - [subset-failed](https://docs.laminapdf.com/reference/codes/subset-failed.md): subsetting a font failed - [syntax](https://docs.laminapdf.com/reference/codes/syntax.md): a token or structure did not match the PDF grammar - [text-module-not-loaded](https://docs.laminapdf.com/reference/codes/text-module-not-loaded.md): a font or text call was made on a builder of the base module, which has no fonts or text - [text-overflow](https://docs.laminapdf.com/reference/codes/text-overflow.md): a text box's lines don't all fit its height and its options asked for an error - [tounicode-conflict](https://docs.laminapdf.com/reference/codes/tounicode-conflict.md): one glyph was used for two different texts; ToUnicode keeps the first - [type](https://docs.laminapdf.com/reference/codes/type.md): an object had a different type than the structure requires - [unexpected-eof](https://docs.laminapdf.com/reference/codes/unexpected-eof.md): the input ended before a complete token or object was read - [unknown-axis](https://docs.laminapdf.com/reference/codes/unknown-axis.md): an instance was asked for on a variation axis the font does not have - [unknown-code](https://docs.laminapdf.com/reference/codes/unknown-code.md): explain was given a code that isn't a Lamina PDF error or warning code - [unknown-destination](https://docs.laminapdf.com/reference/codes/unknown-destination.md): a link or outline item names a destination that was never defined - [unknown-font](https://docs.laminapdf.com/reference/codes/unknown-font.md): a FontKey was used with a registry that did not hand it out - [unknown-option](https://docs.laminapdf.com/reference/codes/unknown-option.md): an options record passed to a binding has a key Lamina PDF does not know - [unknown-page](https://docs.laminapdf.com/reference/codes/unknown-page.md): an op names a page the document does not have - [unmapped-glyph](https://docs.laminapdf.com/reference/codes/unmapped-glyph.md): a font shows glyphs that nothing maps to text - [unnumbered-heading-misused](https://docs.laminapdf.com/reference/codes/unnumbered-heading-misused.md): an unnumbered H heading shares its parent with another H, or the document also uses H1-H6, which PDF/UA-1 forbids - [unset-object](https://docs.laminapdf.com/reference/codes/unset-object.md): a writer object number was reserved but never given a value - [unsupported-filter](https://docs.laminapdf.com/reference/codes/unsupported-filter.md): a stream uses a filter Lamina PDF does not implement - [unsupported-image](https://docs.laminapdf.com/reference/codes/unsupported-image.md): the image uses a feature that PDF or Lamina PDF does not support - [unsupported-layout-option](https://docs.laminapdf.com/reference/codes/unsupported-layout-option.md): a layout option that is not implemented yet was asked for - [unsupported-security-handler](https://docs.laminapdf.com/reference/codes/unsupported-security-handler.md): the document uses a security handler Lamina PDF cannot decrypt - [unsupported-version](https://docs.laminapdf.com/reference/codes/unsupported-version.md): an op log has a schema version this reader does not know - [untagged-content](https://docs.laminapdf.com/reference/codes/untagged-content.md): content was drawn outside every structure element and artifact, which PDF/UA-1 forbids - [warnings-truncated](https://docs.laminapdf.com/reference/codes/warnings-truncated.md): more than max_warnings warnings were raised and the rest were dropped - [wasm-trap](https://docs.laminapdf.com/reference/codes/wasm-trap.md): the WebAssembly module trapped (a bug in Lamina PDF), so its instance was discarded and the next call gets a fresh one - [whole-font-rebuilt](https://docs.laminapdf.com/reference/codes/whole-font-rebuilt.md): a font that forbids subsetting was rebuilt with every glyph kept - [worker-crashed](https://docs.laminapdf.com/reference/codes/worker-crashed.md): the worker running Lamina PDF stopped (an uncaught error, a WebAssembly trap or out of memory); calls in flight were rejected - [worker-failed](https://docs.laminapdf.com/reference/codes/worker-failed.md): the worker client failed with an error that isn't Lamina PDF's (a bug in @laminapdf/sdk/worker, or a result it couldn't send) - [worker-version-mismatch](https://docs.laminapdf.com/reference/codes/worker-version-mismatch.md): the worker answered with a different protocol or package version than the client - [would-invalidate-signatures](https://docs.laminapdf.com/reference/codes/would-invalidate-signatures.md): the save would break one or more signatures - [wrong-document](https://docs.laminapdf.com/reference/codes/wrong-document.md): finish_fonts was given a document the registry did not reserve its fonts in - [wrong-password](https://docs.laminapdf.com/reference/codes/wrong-password.md): the given password is neither the user nor the owner password - [xobject-cycle](https://docs.laminapdf.com/reference/codes/xobject-cycle.md): a Form XObject draws itself, directly or through other forms - [xref-repaired](https://docs.laminapdf.com/reference/codes/xref-repaired.md): the stored cross-reference data was unusable and was rebuilt by scanning - [xrefstm-ignored](https://docs.laminapdf.com/reference/codes/xrefstm-ignored.md): a hybrid file's /XRefStm could not be read and was ignored