@laminapdf/sdk 0.2.0-alpha.2 → 0.2.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -8
- package/dist/api.d.ts +8 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +4 -2
- package/dist/api.js.map +1 -1
- package/dist/builder.d.ts +43 -22
- package/dist/builder.d.ts.map +1 -1
- package/dist/builder.js +122 -83
- package/dist/builder.js.map +1 -1
- package/dist/document.d.ts +89 -22
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +177 -67
- package/dist/document.js.map +1 -1
- package/dist/errors.d.ts +5 -5
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +10 -16
- package/dist/errors.js.map +1 -1
- package/dist/extract-job.d.ts +100 -0
- package/dist/extract-job.d.ts.map +1 -0
- package/dist/extract-job.js +177 -0
- package/dist/extract-job.js.map +1 -0
- package/dist/extract.d.ts +57 -0
- package/dist/extract.d.ts.map +1 -0
- package/dist/extract.js +5 -0
- package/dist/extract.js.map +1 -0
- package/dist/font.d.ts +13 -6
- package/dist/font.d.ts.map +1 -1
- package/dist/font.js +50 -20
- package/dist/font.js.map +1 -1
- package/dist/generated/builder-enums.d.ts +3 -3
- package/dist/generated/builder-enums.d.ts.map +1 -1
- package/dist/generated/builder-enums.js +10 -0
- package/dist/generated/builder-enums.js.map +1 -1
- package/dist/generated/codes.d.ts +18 -6
- package/dist/generated/codes.d.ts.map +1 -1
- package/dist/generated/codes.js +114 -5
- package/dist/generated/codes.js.map +1 -1
- package/dist/generated/explain.d.ts.map +1 -1
- package/dist/generated/explain.js +45 -11
- package/dist/generated/explain.js.map +1 -1
- package/dist/generated/extract.d.ts +282 -0
- package/dist/generated/extract.d.ts.map +1 -0
- package/dist/generated/extract.js +4 -0
- package/dist/generated/extract.js.map +1 -0
- package/dist/init.d.ts +13 -5
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +23 -11
- package/dist/init.js.map +1 -1
- package/dist/internal/handle.d.ts +58 -0
- package/dist/internal/handle.d.ts.map +1 -0
- package/dist/internal/handle.js +113 -0
- package/dist/internal/handle.js.map +1 -0
- package/dist/internal/instance.d.ts +56 -0
- package/dist/internal/instance.d.ts.map +1 -0
- package/dist/internal/instance.js +125 -0
- package/dist/internal/instance.js.map +1 -0
- package/dist/source/http.d.ts +1 -1
- package/dist/source/http.js +2 -2
- package/dist/source/http.js.map +1 -1
- package/dist/source/range.d.ts +6 -1
- package/dist/source/range.d.ts.map +1 -1
- package/dist/source/range.js +10 -6
- package/dist/source/range.js.map +1 -1
- package/dist/text.d.ts +3 -3
- package/dist/text.d.ts.map +1 -1
- package/dist/text.js +3 -3
- package/dist/text.js.map +1 -1
- package/dist/types.d.ts +19 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/dist/version.js.map +1 -1
- package/dist/worker/client.d.ts +3 -2
- package/dist/worker/client.d.ts.map +1 -1
- package/dist/worker/client.js +6 -4
- package/dist/worker/client.js.map +1 -1
- package/dist/worker/entry.js +1 -1
- package/dist/worker/entry.js.map +1 -1
- package/dist/worker/server.d.ts.map +1 -1
- package/dist/worker/server.js +42 -9
- package/dist/worker/server.js.map +1 -1
- package/dist/worker/support.d.ts +13 -3
- package/dist/worker/support.d.ts.map +1 -1
- package/dist/worker/support.js +5 -0
- package/dist/worker/support.js.map +1 -1
- package/dist/worker/types.d.ts +8 -1
- package/dist/worker/types.d.ts.map +1 -1
- package/docs/AGENTS.md +14 -0
- package/docs/api/README.md +166 -0
- package/docs/api/classes/Builder.md +467 -0
- package/docs/api/classes/Document.md +854 -0
- package/docs/api/classes/ExtractJob.md +236 -0
- package/docs/api/classes/Font.md +74 -0
- package/docs/api/classes/Image.md +140 -0
- package/docs/api/classes/LaminaPdfError.md +189 -0
- package/docs/api/classes/Page.md +178 -0
- package/docs/api/classes/PageRef.md +253 -0
- package/docs/api/classes/PageText.md +129 -0
- package/docs/api/classes/PageTextRun.md +167 -0
- package/docs/api/classes/PendingPath.md +97 -0
- package/docs/api/classes/SaveJob.md +205 -0
- package/docs/api/classes/Surface.md +331 -0
- package/docs/api/classes/Transaction.md +111 -0
- package/docs/api/functions/callbackSource.md +33 -0
- package/docs/api/functions/extractWithModels.md +70 -0
- package/docs/api/functions/httpRangeSource.md +48 -0
- package/docs/api/functions/init.md +36 -0
- package/docs/api/functions/isExtractLoaded.md +21 -0
- package/docs/api/functions/isInitialized.md +19 -0
- package/docs/api/functions/isLaminaPdfError.md +41 -0
- package/docs/api/functions/isTextLoaded.md +19 -0
- package/docs/api/functions/loadExtract.md +28 -0
- package/docs/api/functions/loadText.md +28 -0
- package/docs/api/functions/onLeak.md +29 -0
- package/docs/api/functions/reset.md +22 -0
- package/docs/api/functions/wasmMemory.md +22 -0
- package/docs/api/interfaces/BuilderOptions.md +108 -0
- package/docs/api/interfaces/ByteRange.md +29 -0
- package/docs/api/interfaces/ChunkOptions.md +37 -0
- package/docs/api/interfaces/Diagnostic.md +67 -0
- package/docs/api/interfaces/ExtractOptions.md +92 -0
- package/docs/api/interfaces/ExtractResult.md +37 -0
- package/docs/api/interfaces/FontInfo.md +37 -0
- package/docs/api/interfaces/HostModels.md +57 -0
- package/docs/api/interfaces/HttpRangeOptions.md +78 -0
- package/docs/api/interfaces/InitOptions.md +40 -0
- package/docs/api/interfaces/LayoutRegion.md +38 -0
- package/docs/api/interfaces/Leak.md +21 -0
- package/docs/api/interfaces/Location.md +53 -0
- package/docs/api/interfaces/ModelInfo.md +45 -0
- package/docs/api/interfaces/ModelRequest.md +45 -0
- package/docs/api/interfaces/Models.md +45 -0
- package/docs/api/interfaces/OcrWord.md +37 -0
- package/docs/api/interfaces/OpLog.md +25 -0
- package/docs/api/interfaces/OpenOptions.md +37 -0
- package/docs/api/interfaces/PageTextOptions.md +21 -0
- package/docs/api/interfaces/PathBuilder.md +195 -0
- package/docs/api/interfaces/QuadPoint.md +25 -0
- package/docs/api/interfaces/RangeOptions.md +54 -0
- package/docs/api/interfaces/RangeSource.md +59 -0
- package/docs/api/interfaces/StrokeStyle.md +61 -0
- package/docs/api/interfaces/TagSpec.md +69 -0
- package/docs/api/interfaces/TextBoxOptions.md +93 -0
- package/docs/api/interfaces/TextGlyph.md +29 -0
- package/docs/api/interfaces/TextOptions.md +101 -0
- package/docs/api/interfaces/WasmMemory.md +37 -0
- package/docs/api/type-aliases/AfRelationship.md +15 -0
- package/docs/api/type-aliases/Align.md +15 -0
- package/docs/api/type-aliases/ArtifactKind.md +15 -0
- package/docs/api/type-aliases/AttachmentOptions.md +15 -0
- package/docs/api/type-aliases/BlendMode.md +15 -0
- package/docs/api/type-aliases/BoxRect.md +15 -0
- package/docs/api/type-aliases/BuildOptions.md +15 -0
- package/docs/api/type-aliases/Cell.md +71 -0
- package/docs/api/type-aliases/Chunk.md +79 -0
- package/docs/api/type-aliases/Color.md +16 -0
- package/docs/api/type-aliases/Coordinates.md +55 -0
- package/docs/api/type-aliases/Direction.md +15 -0
- package/docs/api/type-aliases/DocumentInfo.md +15 -0
- package/docs/api/type-aliases/DropReason.md +15 -0
- package/docs/api/type-aliases/Dropped.md +59 -0
- package/docs/api/type-aliases/Edited.md +15 -0
- package/docs/api/type-aliases/ErrorCode.md +15 -0
- package/docs/api/type-aliases/ErrorKind.md +15 -0
- package/docs/api/type-aliases/ExtractFormat.md +15 -0
- package/docs/api/type-aliases/ExtractJobOptions.md +31 -0
- package/docs/api/type-aliases/ExtractStep.md +61 -0
- package/docs/api/type-aliases/ExtractedBlock.md +94 -0
- package/docs/api/type-aliases/ExtractedPage.md +73 -0
- package/docs/api/type-aliases/ExtractedSource.md +48 -0
- package/docs/api/type-aliases/Extraction.md +22 -0
- package/docs/api/type-aliases/FillRule.md +15 -0
- package/docs/api/type-aliases/Fit.md +15 -0
- package/docs/api/type-aliases/Flags.md +15 -0
- package/docs/api/type-aliases/Generator.md +43 -0
- package/docs/api/type-aliases/GlyphQuad.md +15 -0
- package/docs/api/type-aliases/InfoPatch.md +15 -0
- package/docs/api/type-aliases/LaminaPdfWarning.md +16 -0
- package/docs/api/type-aliases/LimitName.md +15 -0
- package/docs/api/type-aliases/Limits.md +15 -0
- package/docs/api/type-aliases/LineBox.md +15 -0
- package/docs/api/type-aliases/LineCap.md +15 -0
- package/docs/api/type-aliases/LineJoin.md +15 -0
- package/docs/api/type-aliases/LinkTarget.md +15 -0
- package/docs/api/type-aliases/Metadata.md +15 -0
- package/docs/api/type-aliases/ModelResult.md +15 -0
- package/docs/api/type-aliases/Op.md +15 -0
- package/docs/api/type-aliases/OutlineEntry.md +15 -0
- package/docs/api/type-aliases/OutlineNode.md +15 -0
- package/docs/api/type-aliases/Overflow.md +15 -0
- package/docs/api/type-aliases/PageInfo.md +15 -0
- package/docs/api/type-aliases/PageLabel.md +15 -0
- package/docs/api/type-aliases/PageSizeName.md +15 -0
- package/docs/api/type-aliases/Point.md +15 -0
- package/docs/api/type-aliases/Profile.md +15 -0
- package/docs/api/type-aliases/Progress.md +15 -0
- package/docs/api/type-aliases/ReadingOrder.md +15 -0
- package/docs/api/type-aliases/Rect.md +15 -0
- package/docs/api/type-aliases/Region.md +31 -0
- package/docs/api/type-aliases/RegionLabel.md +15 -0
- package/docs/api/type-aliases/RenderMode.md +15 -0
- package/docs/api/type-aliases/Rotation.md +15 -0
- package/docs/api/type-aliases/SaveOptions.md +15 -0
- package/docs/api/type-aliases/SaveReport.md +15 -0
- package/docs/api/type-aliases/Span.md +74 -0
- package/docs/api/type-aliases/SplitOn.md +15 -0
- package/docs/api/type-aliases/Standard14.md +15 -0
- package/docs/api/type-aliases/StructRef.md +41 -0
- package/docs/api/type-aliases/StructSource.md +17 -0
- package/docs/api/type-aliases/StructureKid.md +15 -0
- package/docs/api/type-aliases/StructureNode.md +16 -0
- package/docs/api/type-aliases/TableDetector.md +15 -0
- package/docs/api/type-aliases/TableMode.md +15 -0
- package/docs/api/type-aliases/TableScope.md +15 -0
- package/docs/api/type-aliases/Tag.md +15 -0
- package/docs/api/type-aliases/TagName.md +15 -0
- package/docs/api/type-aliases/Target.md +15 -0
- package/docs/api/type-aliases/TargetView.md +18 -0
- package/docs/api/type-aliases/TextLayer.md +72 -0
- package/docs/api/type-aliases/TextLayerStatus.md +15 -0
- package/docs/api/type-aliases/TextLayout.md +15 -0
- package/docs/api/type-aliases/TextRange.md +33 -0
- package/docs/api/type-aliases/TextRunInfo.md +15 -0
- package/docs/api/type-aliases/Transform.md +15 -0
- package/docs/api/type-aliases/UndoOutcome.md +15 -0
- package/docs/api/type-aliases/ViewerPreferences.md +15 -0
- package/docs/api/type-aliases/WarningCode.md +15 -0
- package/docs/api/type-aliases/WasmSource.md +16 -0
- package/docs/api/variables/Matrix.md +99 -0
- package/docs/api/variables/PAGE_SIZES.md +15 -0
- package/docs/api/variables/TAG_NAMES.md +15 -0
- package/docs/errors/README.md +173 -0
- package/docs/errors/aes-padding-invalid.md +34 -0
- package/docs/errors/already-initialized.md +34 -0
- package/docs/errors/binary-output-to-terminal.md +35 -0
- package/docs/errors/builder-finished.md +35 -0
- package/docs/errors/cancelled.md +35 -0
- package/docs/errors/cmap-invalid.md +42 -0
- package/docs/errors/collection-index.md +33 -0
- package/docs/errors/color-components.md +33 -0
- package/docs/errors/content-bad-operands.md +36 -0
- package/docs/errors/content-path-unpainted.md +36 -0
- package/docs/errors/content-resource-missing.md +37 -0
- package/docs/errors/content-syntax.md +36 -0
- package/docs/errors/content-unbalanced-bt.md +36 -0
- package/docs/errors/content-unbalanced-marked.md +36 -0
- package/docs/errors/content-unbalanced-q.md +36 -0
- package/docs/errors/content-unknown-operator.md +37 -0
- package/docs/errors/covered-text.md +33 -0
- package/docs/errors/data-pending.md +34 -0
- package/docs/errors/decompress.md +34 -0
- package/docs/errors/device-color-without-output-intent.md +33 -0
- package/docs/errors/direct-page.md +34 -0
- package/docs/errors/disposed.md +34 -0
- package/docs/errors/document-changed.md +34 -0
- package/docs/errors/embedded-file-forbidden.md +35 -0
- package/docs/errors/embedded-file-without-mime-type.md +36 -0
- package/docs/errors/encoding-full.md +34 -0
- package/docs/errors/encrypted-base.md +33 -0
- package/docs/errors/extract-column-order-uncertain.md +38 -0
- package/docs/errors/extract-limit-blocks.md +35 -0
- package/docs/errors/extract-module-not-loaded.md +37 -0
- package/docs/errors/extract-needs-ocr.md +37 -0
- package/docs/errors/extract-reading-order-ambiguous.md +32 -0
- package/docs/errors/extract-struct-tree-ignored.md +32 -0
- package/docs/errors/extract-table-ambiguous.md +32 -0
- package/docs/errors/extract-table-limit.md +35 -0
- package/docs/errors/extract-untagged-content.md +32 -0
- package/docs/errors/fetch-failed.md +34 -0
- package/docs/errors/flate-truncated.md +34 -0
- package/docs/errors/flow-content-too-large.md +34 -0
- package/docs/errors/flow-keep-broken.md +34 -0
- package/docs/errors/flow-layout-unstable.md +38 -0
- package/docs/errors/font-invalid.md +36 -0
- package/docs/errors/font-mismatch.md +34 -0
- package/docs/errors/font-not-embeddable.md +34 -0
- package/docs/errors/font-not-embedded.md +35 -0
- package/docs/errors/font-not-shapable.md +33 -0
- package/docs/errors/glyph-out-of-range.md +34 -0
- package/docs/errors/glyph-without-unicode.md +37 -0
- package/docs/errors/heading-level-skipped.md +36 -0
- package/docs/errors/image-data-length.md +33 -0
- package/docs/errors/image-too-large.md +32 -0
- package/docs/errors/inline-image-unterminated.md +36 -0
- package/docs/errors/input-unreadable.md +37 -0
- package/docs/errors/instance-reset.md +34 -0
- package/docs/errors/invalid-argument.md +33 -0
- package/docs/errors/invalid-axis-value.md +32 -0
- package/docs/errors/invalid-box.md +34 -0
- package/docs/errors/invalid-color.md +32 -0
- package/docs/errors/invalid-command-line.md +44 -0
- package/docs/errors/invalid-date.md +34 -0
- package/docs/errors/invalid-entry.md +34 -0
- package/docs/errors/invalid-feature.md +32 -0
- package/docs/errors/invalid-font.md +32 -0
- package/docs/errors/invalid-geometry.md +32 -0
- package/docs/errors/invalid-icc-profile.md +32 -0
- package/docs/errors/invalid-image.md +33 -0
- package/docs/errors/invalid-op-log.md +33 -0
- package/docs/errors/invalid-page-label.md +34 -0
- package/docs/errors/invalid-page-labels.md +32 -0
- package/docs/errors/invalid-page-range.md +37 -0
- package/docs/errors/invalid-rotate.md +34 -0
- package/docs/errors/invalid-spans.md +39 -0
- package/docs/errors/invalid-structure-nesting.md +38 -0
- package/docs/errors/invalid-structure.md +34 -0
- package/docs/errors/invalid-text-range.md +33 -0
- package/docs/errors/job-finished.md +34 -0
- package/docs/errors/limit-exceeded.md +38 -0
- package/docs/errors/link-without-contents.md +33 -0
- package/docs/errors/link-without-structure.md +37 -0
- package/docs/errors/markdown-html-ignored.md +33 -0
- package/docs/errors/markdown-image-missing.md +34 -0
- package/docs/errors/missing-alt-text.md +33 -0
- package/docs/errors/missing-glyph.md +33 -0
- package/docs/errors/missing-header.md +37 -0
- package/docs/errors/missing-lang.md +32 -0
- package/docs/errors/missing-root.md +34 -0
- package/docs/errors/missing-title.md +32 -0
- package/docs/errors/model-failed.md +33 -0
- package/docs/errors/model-needs-host.md +40 -0
- package/docs/errors/model-result-unexpected.md +36 -0
- package/docs/errors/name-tree-node-skipped.md +34 -0
- package/docs/errors/nested-transaction.md +34 -0
- package/docs/errors/no-pending-save.md +32 -0
- package/docs/errors/no-transaction.md +33 -0
- package/docs/errors/not-initialized.md +35 -0
- package/docs/errors/not-pdf.md +33 -0
- package/docs/errors/not-rebased.md +35 -0
- package/docs/errors/object-number-out-of-range.md +38 -0
- package/docs/errors/objstm-index-mismatch.md +36 -0
- package/docs/errors/out-of-memory.md +38 -0
- package/docs/errors/outline-cycle.md +34 -0
- package/docs/errors/outline-item-skipped.md +34 -0
- package/docs/errors/output-unwritable.md +37 -0
- package/docs/errors/overwrite-refused.md +36 -0
- package/docs/errors/page-count-mismatch.md +34 -0
- package/docs/errors/page-index-out-of-range.md +34 -0
- package/docs/errors/page-tree-node-skipped.md +35 -0
- package/docs/errors/password-required.md +36 -0
- package/docs/errors/path-outside-roots.md +32 -0
- package/docs/errors/perms-mismatch.md +34 -0
- package/docs/errors/profile-version-conflict.md +35 -0
- package/docs/errors/redaction-not-applied.md +32 -0
- package/docs/errors/reference-cycle.md +35 -0
- package/docs/errors/render-backend-unavailable.md +32 -0
- package/docs/errors/render-failed.md +33 -0
- package/docs/errors/render-too-large.md +36 -0
- package/docs/errors/repaired-base.md +34 -0
- package/docs/errors/requires-rewrite.md +38 -0
- package/docs/errors/revision-index-out-of-range.md +34 -0
- package/docs/errors/saved-not-rebased.md +34 -0
- package/docs/errors/sink-not-empty.md +33 -0
- package/docs/errors/sink.md +31 -0
- package/docs/errors/source-budget-exceeded.md +34 -0
- package/docs/errors/source-changed.md +33 -0
- package/docs/errors/source.md +30 -0
- package/docs/errors/stale-generation.md +34 -0
- package/docs/errors/stream-length-recovered.md +37 -0
- package/docs/errors/strict.md +34 -0
- package/docs/errors/subset-failed.md +31 -0
- package/docs/errors/syntax.md +34 -0
- package/docs/errors/tag-element-not-open.md +41 -0
- package/docs/errors/tag-element-unclosed.md +34 -0
- package/docs/errors/text-in-earlier-revision.md +36 -0
- package/docs/errors/text-module-not-loaded.md +36 -0
- package/docs/errors/text-overflow.md +34 -0
- package/docs/errors/tounicode-conflict.md +32 -0
- package/docs/errors/type.md +34 -0
- package/docs/errors/unexpected-eof.md +34 -0
- package/docs/errors/unknown-axis.md +33 -0
- package/docs/errors/unknown-code.md +36 -0
- package/docs/errors/unknown-destination.md +33 -0
- package/docs/errors/unknown-font.md +33 -0
- package/docs/errors/unknown-option.md +33 -0
- package/docs/errors/unknown-page.md +34 -0
- package/docs/errors/unmapped-glyph.md +36 -0
- package/docs/errors/unnumbered-heading-misused.md +34 -0
- package/docs/errors/unset-object.md +30 -0
- package/docs/errors/unsupported-filter.md +34 -0
- package/docs/errors/unsupported-image.md +33 -0
- package/docs/errors/unsupported-layout-option.md +33 -0
- package/docs/errors/unsupported-security-handler.md +34 -0
- package/docs/errors/unsupported-version.md +32 -0
- package/docs/errors/untagged-content.md +35 -0
- package/docs/errors/warnings-truncated.md +35 -0
- package/docs/errors/wasm-trap.md +37 -0
- package/docs/errors/whole-font-rebuilt.md +30 -0
- package/docs/errors/worker-crashed.md +33 -0
- package/docs/errors/worker-failed.md +32 -0
- package/docs/errors/worker-version-mismatch.md +34 -0
- package/docs/errors/would-invalidate-signatures.md +38 -0
- package/docs/errors/wrong-document.md +33 -0
- package/docs/errors/wrong-password.md +34 -0
- package/docs/errors/xobject-cycle.md +36 -0
- package/docs/errors/xref-repaired.md +36 -0
- package/docs/errors/xrefstm-ignored.md +34 -0
- package/docs/llms.txt +94 -0
- package/docs/pages/concepts/dependencies.md +44 -0
- package/docs/pages/concepts/drawing-pages.md +76 -0
- package/docs/pages/concepts/errors-and-warnings.md +68 -0
- package/docs/pages/concepts/how-lamina-thinks.md +98 -0
- package/docs/pages/concepts/pages-and-coordinates.md +75 -0
- package/docs/pages/guides/accessible-pdfs.md +262 -0
- package/docs/pages/guides/archival-pdfs.md +433 -0
- package/docs/pages/guides/edit-a-pdf.md +143 -0
- package/docs/pages/guides/flowing-pages.md +379 -0
- package/docs/pages/guides/fonts-and-text.md +204 -0
- package/docs/pages/guides/images-and-vectors.md +221 -0
- package/docs/pages/guides/keep-the-page-responsive.md +85 -0
- package/docs/pages/guides/links-outlines-and-metadata.md +224 -0
- package/docs/pages/guides/open-large-files.md +69 -0
- package/docs/pages/guides/password-protected-files.md +70 -0
- package/docs/pages/guides/save-a-pdf.md +154 -0
- package/docs/pages/guides/test-generated-pdfs.md +324 -0
- package/docs/pages/guides/untrusted-files.md +82 -0
- package/docs/pages/index.md +33 -0
- package/docs/pages/install.md +79 -0
- package/docs/pages/quick-start/browser.md +71 -0
- package/docs/pages/quick-start/bun.md +64 -0
- package/docs/pages/quick-start/deno.md +62 -0
- package/docs/pages/quick-start/node.md +65 -0
- package/docs/pages/quick-start/rust.md +62 -0
- package/docs/pages/quick-start/workers.md +139 -0
- package/docs/pages/recipes/cloudflare-worker.md +115 -0
- package/docs/pages/recipes/element-flow.md +248 -0
- package/docs/pages/recipes/extract-markdown.md +152 -0
- package/docs/pages/recipes/generate-then-edit.md +142 -0
- package/docs/pages/recipes/hello.md +101 -0
- package/docs/pages/recipes/images-and-vectors.md +216 -0
- package/docs/pages/recipes/invoice.md +233 -0
- package/docs/pages/recipes/links-and-outlines.md +222 -0
- package/docs/pages/recipes/multilingual.md +196 -0
- package/docs/pages/recipes/open-untrusted.md +65 -0
- package/docs/pages/recipes/pdf-a-archive.md +212 -0
- package/docs/pages/recipes/pdf-a3-invoice-with-xml.md +229 -0
- package/docs/pages/recipes/pdf-ua-report.md +244 -0
- package/docs/pages/recipes/report.md +125 -0
- package/docs/pages/recipes/web-worker-client.md +64 -0
- package/docs/pages/recipes.md +48 -0
- package/docs/pages/reference/benchmarks.md +93 -0
- package/docs/pages/reference/changelog.md +134 -0
- package/docs/pages/reference/codes.md +14 -0
- package/docs/pages/reference/glossary.md +108 -0
- package/docs/pages/reference/rust.md +36 -0
- package/docs/pages/reference/stability.md +59 -0
- package/docs/pages/start/coding-agents.md +45 -0
- package/docs/pages/start/first-pdf.md +81 -0
- package/docs/pages/troubleshooting.md +74 -0
- package/docs/renames.json +86 -0
- package/docs/schemas/error.schema.json +322 -0
- package/docs/schemas/renames.schema.json +29 -0
- package/package.json +7 -3
- package/schemas/error.schema.json +37 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.js","sourceRoot":"","sources":["../../src/generated/codes.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,2FAA2F;AAsK3F,+CAA+C;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAyB;IAC/C,SAAS;IACT,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,QAAQ;IACR,cAAc;IACd,QAAQ;IACR,MAAM;IACN,mBAAmB;IACnB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,mBAAmB;IACnB,gBAAgB;IAChB,8BAA8B;IAC9B,gBAAgB;IAChB,QAAQ;IACR,oBAAoB;IACpB,YA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":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzD,4DAA4D;AAC5D,eAAO,MAAM,KAAK,EAAE;IAAE,QAAQ,EAAE,CAAC,IAAI,SAAS,GAAG,WAAW,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"explain.d.ts","sourceRoot":"","sources":["../../src/generated/explain.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzD,4DAA4D;AAC5D,eAAO,MAAM,KAAK,EAAE;IAAE,QAAQ,EAAE,CAAC,IAAI,SAAS,GAAG,WAAW,GAAG,MAAM;CAsKpE,CAAC"}
|
|
@@ -37,6 +37,14 @@ export const PAGES = {
|
|
|
37
37
|
"font-invalid": "# `font-invalid`\n\n- Type: warning\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nA font dictionary read for text extraction has a missing, unreadable or malformed entry (the descendant font, `/Encoding` or its `/Differences`, `/Widths`, `/W`, `/W2`, the font descriptor or its font program). Its text was decoded with defaults: the standard encoding, the standard 14 font's widths or `/MissingWidth`, `/DW`.\n\n## Why\n\nA producer bug, a damaged file, or a font dictionary that relies on what a viewer guesses.\n\n## How to fix\n\nNothing to do. Text or positions extracted for that font may be off; regenerating the file with a current producer fixes it.\n\n## Example\n\n```text\n<< /Type /Font /Subtype /Type0 /BaseFont /Foo /Encoding /Identity-H /DescendantFonts 99 0 R >>\n```\n\nThe descendant font is missing, so text in this font is decoded with defaults: two-byte codes, default widths. The `location` is the font dictionary's `object`.\n\n## Data fields\n\nNone.\n\nThe `location` is `object`, the font dictionary's object; none for a direct font dictionary.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [B9b](../todos/done/B9b-text-extraction-core.md): text extraction\n",
|
|
38
38
|
"cmap-invalid": "# `cmap-invalid`\n\n- Type: warning\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nA font's CMap (its Type 0 `/Encoding`) or ToUnicode CMap couldn't be fully used, for one of three reasons:\n\n- entries that can't be read, which are skipped;\n- a predefined CMap Lamina PDF has no table for, read as Identity (Lamina PDF knows only `Identity-H`/`-V` and the `Uni…-UCS2-…`/`Uni…-UTF16-…` ones);\n- a `/UseCMap` chain deeper than 8 levels, cut there.\n\n## Why\n\nA producer bug (bad ranges, a missing `end…` keyword), or a CJK file using one of Adobe's character-collection CMaps without embedding it.\n\n## How to fix\n\nNothing to do. The rest of the CMap is used; affected glyphs may extract as other text or U+FFFD.\n\n## Example\n\n```text\n1 beginbfchar\n<0003> <0020\nendbfchar\n```\n\nThe destination string is not closed; the entry is skipped, and the rest of the ToUnicode CMap is used.\n\n## Data fields\n\nNone.\n\nThe `location` is `object`, the font dictionary's object; none for a direct font dictionary.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [B9b](../todos/done/B9b-text-extraction-core.md): text extraction\n",
|
|
39
39
|
"unmapped-glyph": "# `unmapped-glyph`\n\n- Type: warning\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nA font showed glyphs that its ToUnicode CMap, its encoding's glyph names and its font program's `cmap` all leave unmapped. They extract as U+FFFD; `PageText::unmapped` counts them.\n\n## Why\n\nThe file has no ToUnicode CMap for a subset or symbolic font, uses arbitrary glyph names (`g37`), or obfuscates its encoding (ISO 32000-2 §9.10.2: there is then no way to know what the glyph means).\n\n## How to fix\n\nNothing to do in Lamina PDF. A producer that writes ToUnicode CMaps (Lamina PDF does) avoids it; OCR is the only way to recover such text.\n\n## Example\n\n```text\n<< /Subtype /Type0 /BaseFont /ABCDEF+Subset /Encoding /Identity-H >> % no /ToUnicode\n```\n\nA subset font with Identity-H and no ToUnicode: unless its embedded `cmap` maps the glyphs, they extract as U+FFFD and the warning carries the font's `object`.\n\n## Data fields\n\nNone.\n\nThe `location` is `object`, the font dictionary's object; none for a direct font dictionary.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [B9b](../todos/done/B9b-text-extraction-core.md): text extraction\n",
|
|
40
|
+
"extract-limit-blocks": "# `extract-limit-blocks`\n\n- Type: warning\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nA page had more runs of text than `ExtractLimits::max_blocks_per_page` allows. Since each run can be a block of its own, extraction kept the first runs the page draws and left out the rest. It cuts them before grouping runs into blocks, so the work stays bounded.\n\n## Why\n\nA page of many tiny separate pieces of text, such as a dense table, a map with hundreds of labels, or a file built to slow extraction down.\n\n## How to fix\n\nRaise `max_blocks_per_page` if the page really holds that many blocks.\n\n## Example\n\n```rust\nlet mut options = laminapdf_extract::ExtractOptions::default();\noptions.limits.max_blocks_per_page = 50_000;\n```\n\n## Data fields\n\n- `limit`: the limit that was reached.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L3a](../todos/done/L3a-lamina-extract-reading-order.md): blocks and reading order\n",
|
|
41
|
+
"extract-reading-order-ambiguous": "# `extract-reading-order-ambiguous`\n\n- Type: warning\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nA page mixes horizontal and vertical writing. Extraction put its blocks in an order, but no layout rule tells which comes first, so the order is a guess.\n\n## Why\n\nJapanese and Chinese pages often set the body vertically and captions, headings or page numbers horizontally. Without a structure tree, nothing in the file says how the two relate.\n\n## How to fix\n\nNothing to do in Lamina PDF; the file is valid. Like every warning, it fails the call in strict mode. Check the order of that page's blocks, or ask for the order the content stream draws (`ReadingOrder::ContentStream`). A tagged file avoids the guess.\n\n## Example\n\nA page whose body text is drawn with a vertical font (`Identity-V`) and whose page number is drawn with a horizontal one.\n\n## Data fields\n\nNone.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L3a](../todos/done/L3a-lamina-extract-reading-order.md): blocks and reading order\n",
|
|
42
|
+
"extract-table-ambiguous": "# `extract-table-ambiguous`\n\n- Type: warning\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nExtraction found a table drawn with lines, but the cells its missing lines would join don't make a rectangle. Extraction kept the table and gave it one cell per square of its grid, so a merged cell's text sits in the first of the squares it covers.\n\n## Why\n\nA table's lines tell where cells are merged: a missing line between two squares joins them. Joined squares that form an L or a T shape don't describe a cell, usually because a line is drawn slightly short, drawn twice in different places, or covered by a white rectangle.\n\n## How to fix\n\nNothing to do in Lamina PDF; the file is valid. Like every warning, it fails the call in strict mode. Check that table's cells: the text of a merged cell may be split across its neighbours.\n\n## Example\n\nA table whose header spans two columns over the first row only, but whose line under that header stops halfway.\n\n## Data fields\n\nNone.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L3b](../todos/done/L3b-extract-tables-and-serialisers.md): tables and extraction output\n",
|
|
43
|
+
"extract-table-limit": "# `extract-table-limit`\n\n- Type: warning\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nA page's ruling lines would have made a table with more cells than `ExtractLimits::max_table_cells` allows, or the page drew so many lines that matching them all would cost too much. Extraction made no table from those lines; their text is still in the page's paragraphs.\n\n## Why\n\nA page drawn with thousands of lines, such as a large grid, a chart's gridlines or a file built to slow extraction down. To find a table, extraction compares every horizontal line with every vertical one, so the work grows with the square of the line count.\n\n## How to fix\n\nRaise `max_table_cells` if the page really holds a table that big.\n\n## Example\n\n```rust\nlet mut options = laminapdf_extract::ExtractOptions::default();\noptions.limits.max_table_cells = 50_000;\n```\n\n## Data fields\n\n- `limit`: the limit that was reached.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L3b](../todos/done/L3b-extract-tables-and-serialisers.md): tables and extraction output\n",
|
|
44
|
+
"extract-struct-tree-ignored": "# `extract-struct-tree-ignored`\n\n- Type: warning\n- Kind: `input` (a problem with the PDF file)\n\n## What happened\n\nThe page is tagged, but its structure tree didn't pass the checks that decide whether to trust it, so extraction read the page in layout order instead.\n\n## Why\n\nA structure tree gives a page's reading order, but trees are often incomplete or wrong. Extraction uses a page's tree only when its elements cover at least 80% of the page's visible text, not counting headers, page numbers and other text the file marks as page furniture. Its order must also jump back up into an earlier column at most once in ten moves from block to block. A tree written by a tool that tags only some of the text, or that tags it in drawing order, fails one of the checks.\n\n## How to fix\n\nNothing to do: the page reads in layout order, as an untagged page would. To use the tree anyway, extract with `ReadingOrder::Tagged` (`readingOrder: \"tagged\"`). Like every warning, it fails the call in strict mode.\n\n## Example\n\nA report whose tool tagged only its headings: the tree covers a tenth of the text, so the reason is `coverage`.\n\n## Data fields\n\n- `reason`: `coverage` or `order`, the check that failed.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md): the extraction output and the reading-order sources\n",
|
|
45
|
+
"extract-untagged-content": "# `extract-untagged-content`\n\n- Type: warning\n- Kind: `input` (a problem with the PDF file)\n\n## What happened\n\nThe page was read in its structure tree's order, but some of its visible text isn't in the tree and isn't marked as an artifact. Extraction kept that text and put it after the tree's blocks, in layout order.\n\n## Why\n\nIn a tagged file, every piece of visible content should belong to a structure element or be marked as an artifact (ISO 32000-2 §14.8.2.2). Text that is neither has no place in the tree's order. A tool that adds text after tagging a document, such as a stamp or a page number, often leaves text like this.\n\n## How to fix\n\nNothing to do in Lamina PDF. To give that text its place in the reading order, tag it in the file, or mark it as an artifact if it isn't content. Like every warning, it fails the call in strict mode.\n\n## Example\n\nA tagged contract with a \"DRAFT\" stamp drawn after tagging: the stamp's text comes after the contract's blocks.\n\n## Data fields\n\n- `chars`: how many characters (spaces left out) lie outside the tree.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md): the extraction output and the reading-order sources\n",
|
|
46
|
+
"extract-needs-ocr": "# `extract-needs-ocr`\n\n- Type: warning\n- Kind: `unsupported` (something Lamina PDF can't do yet)\n\n## What happened\n\nThe page has no text that extraction can use, so the page's Markdown, text and blocks are empty or close to it. Each page's `textLayer` in the extraction says why, and this warning names the pages whose status is `needs-ocr` or `ocr-layer`.\n\n## Why\n\nA page's text comes from its fonts. Some pages draw their words in other ways:\n\n- a scanned page is one image, with no text at all;\n- a page made searchable by OCR has an image under invisible text, which extraction leaves out of the blocks because a reader can't see it;\n- outlined text is drawn as shapes, not glyphs;\n- a font without a Unicode mapping draws glyphs that extraction can't turn into characters.\n\n## How to fix\n\nSend the pages this warning names to OCR or a vision model. On an `ocr-layer` page you can instead keep the existing OCR layer: extraction lists its text under `dropped` as `invisible` when you set `drop: { keepSpans: true }` (`DropOptions::keep_spans` in Rust). Like every warning, it fails the call in strict mode.\n\n## Example\n\nA scanned contract: every page is `needs-ocr`, and the extraction's Markdown is empty.\n\n## Data fields\n\n- `status`: the page's text-layer status, `needs-ocr` or `ocr-layer`.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md): the extraction output and hidden text\n",
|
|
47
|
+
"extract-column-order-uncertain": "# `extract-column-order-uncertain`\n\n- Type: warning\n- Kind: `unsupported` (something Lamina PDF can't do yet)\n\n## What happened\n\nExtraction read the page's columns in an order its layout rules had to guess, so the page's blocks may be in the wrong order. The blocks the guess concerns have a `confidence` of 0.5 instead of 0.75; the order itself is the rules' best one.\n\n## Why\n\nA PDF stores where each piece of text is drawn, not the order to read it in, so extraction works the order out from the layout: columns first, top to bottom. Three layouts leave that order in doubt, and the warning's `reason` names which one it found:\n\n- `narrow-gutter`: two columns sit closer together than a font size, so lines may have been read straight across both columns.\n- `columns-revisited`: a block across the gutter, such as a pull quote with the text wrapped round it, cut the columns into rows, so the order leaves a column and comes back to it.\n- `near-grid`: blocks that look like an unruled table, with one cell wrapped onto a second line, were read column by column; read by rows, the order would differ.\n\nA page that mixes horizontal and vertical writing raises [`extract-reading-order-ambiguous`](extract-reading-order-ambiguous.md) instead.\n\n## How to fix\n\nCheck the page's text, or send the page to a layout model, which reads columns from the page's image. A tagged file read in its structure tree's order never raises this warning. Like every warning, it fails the call in strict mode.\n\n## Example\n\nA newsletter page with two columns set 7 pt apart: each line of the extracted text runs across both columns, and the page is warned with `narrow-gutter`.\n\n## Data fields\n\n- `reason`: `narrow-gutter`, `columns-revisited` or `near-grid`, the first check that doubted the order.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md): the extraction output and reading order\n",
|
|
40
48
|
"not-pdf": "# `not-pdf`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nThe input does not look like a PDF at all.\n\n## Why\n\nThe bytes are empty, or no `n g obj` header appears anywhere in them: an HTML error page saved as `.pdf`, a different format, or the wrong buffer.\n\n## How to fix\n\nCheck that you passed the right bytes.\n\n## Example\n\n```rust\nlet err = laminapdf::Document::open_bytes(b\"<html>…</html>\".to_vec(), Default::default()).unwrap_err();\nassert_eq!(err.code(), \"not-pdf\");\n```\n\n## Data fields\n\nNone.\n",
|
|
41
49
|
"missing-root": "# `missing-root`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nNo document catalog (`/Root`) was found, even after repair.\n\n## Why\n\nThe file is damaged beyond repair.\n\n## How to fix\n\nUse another copy of the file.\n\n## Example\n\n```text\ntrailer << /Size 3 >> % no /Root, and no object with /Type /Catalog in the file\n```\n\nRepair found no catalog to use, so `open` fails.\n\n## Data fields\n\nNone.\n",
|
|
42
50
|
"reference-cycle": "# `reference-cycle`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nA reference chain or the page tree loops back on itself.\n\n## Why\n\nDamaged or hostile files.\n\n## How to fix\n\nUse another copy of the file.\n\n## Example\n\n```text\n5 0 obj 6 0 R endobj\n6 0 obj 5 0 R endobj\n```\n\nResolving object 5 leads back to itself; the call fails instead of looping. A page tree whose `/Kids` lead back to an ancestor fails the same way.\n\n## Data fields\n\nNone.\n",
|
|
@@ -71,34 +79,37 @@ export const PAGES = {
|
|
|
71
79
|
"requires-rewrite": "# `requires-rewrite`\n\n- Type: error (`laminapdf_save::SaveError::RequiresRewrite`)\n- Kind: `state` (the call isn't valid in the document's current state)\n\n## What happened\n\nAn incremental save was requested, but only a full rewrite is safe for this document. Nothing was written.\n\n## Why\n\nThe save planner found one of four reasons the file must be rewritten:\n\n- a repaired base, whose cross-reference data an appended revision can't build on;\n- an encrypted base being saved without its encryption;\n- a document built from scratch, with no base bytes at all;\n- a pending op, such as a redaction, that removes content an earlier revision would keep.\n\n## How to fix\n\nSave with `SaveMode::Auto` (it resolves to a full rewrite) or `SaveMode::FullRewrite`. If the document is also signed, that needs the explicit override ([`would-invalidate-signatures`](would-invalidate-signatures.md)).\n\n## Example\n\n```rust\nlet err = doc.save(&mut out, &SaveOptions::new().with_mode(SaveMode::Incremental)).unwrap_err();\nassert_eq!(err.code(), \"requires-rewrite\");\n```\n\n## Data fields\n\n- `reasons`: the rewrite reasons (`RepairedBase`, `EncryptedBase`, `NoBase`, `OpRequiresRewrite`).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0007](../decisions/0007-save-planner.md) §2\n",
|
|
72
80
|
"invalid-font": "# `invalid-font`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nFont bytes passed to `Font::from_bytes` or `Font::from_collection` (`laminapdf-text`) could not be read as a font.\n\n## Why\n\nThe bytes are not an OpenType/TrueType font or collection (WOFF/WOFF2 must be decompressed first), or a table every font needs (`head`, `hhea`, `hmtx`, `maxp`) is missing or malformed.\n\n## How to fix\n\nPass the bytes of a `.ttf`, `.otf`, `.ttc` or `.otc` file; check that the file is complete.\n\n## Example\n\n```rust\nlet err = laminapdf::Font::from_bytes(std::fs::read(\"font.woff2\")?).unwrap_err(); // invalid-font\n```\n\n## Data fields\n\n- `index`: the collection member that was asked for (0 for a single font).\n",
|
|
73
81
|
"collection-index": "# `collection-index`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Font::from_collection` was asked for a member past the end of the font collection.\n\n## Why\n\nMembers are numbered from 0; a single font counts as a collection of one.\n\n## How to fix\n\nUse an index below `Font::collection_len(bytes)`.\n\n## Example\n\n```rust\nlet font = Font::from_collection(ttc_bytes, 4)?; // the collection has 4 members (0..=3): collection-index\n```\n\n## Data fields\n\n- `index`: the member that was asked for.\n- `count`: how many members the collection has.\n",
|
|
74
|
-
"unknown-axis": "# `unknown-axis`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Font::instance` was given a variation axis the font does not have.\n\n## Why\n\nA static font has no axes; a variable font has the axes listed in `FontInfo::axes` (`fvar`).\n\n## How to fix\n\nCheck `font.info().axes` before choosing coordinates, or use a variable font.\n\n## Example\n\n```rust\nlet bold = static_font.instance(&[(
|
|
82
|
+
"unknown-axis": "# `unknown-axis`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Font::instance` was given a variation axis the font does not have.\n\n## Why\n\nA static font has no axes; a variable font has the axes listed in `FontInfo::axes` (`fvar`).\n\n## How to fix\n\nCheck `font.info().axes` before choosing coordinates, or use a variable font.\n\n## Example\n\n```rust\nlet bold = static_font.instance(&[(OpenTypeTag::WEIGHT, 700.0)])?; // unknown-axis: no wght axis\n```\n\n## Data fields\n\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n- `tag`: the axis tag that was asked for.\n",
|
|
75
83
|
"font-not-embeddable": "# `font-not-embeddable`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`FontRegistry::add` refused a font whose `OS/2.fsType` forbids embedding (restricted licence, or bitmap embedding only).\n\n## Why\n\nFont vendors mark fonts whose licence does not allow embedding in documents (OpenType `OS/2` table; research 03 §6.3). `fsType` is advisory; the licence is what counts.\n\n## How to fix\n\nUse another font, or, if your licence allows embedding, register it with `EmbedPolicy::Override`.\n\n## Example\n\n```rust\nregistry.add(restricted_font, EmbedPolicy::Respect)?; // font-not-embeddable\nregistry.add(restricted_font, EmbedPolicy::Override)?; // only if your licence allows embedding\n```\n\n## Data fields\n\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n- `fs_type`: the `fsType` bits.\n",
|
|
76
84
|
"missing-glyph": "# `missing-glyph`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nText contained a character the font has no glyph for. Lamina PDF never draws `.notdef` (an empty box) silently.\n\n## Why\n\nThe font's `cmap` does not map the character (for example a CJK character with a Latin font).\n\n## How to fix\n\nUse a font that covers the character (check with `Font::glyph_for`), or split the text across fonts.\n\n## Example\n\n```rust\nregistry.encode(latin_font, \"東京\")?; // missing-glyph: the font has no CJK glyphs\n```\n\n## Data fields\n\n- `ch`: the character (**untrusted**: caller or document text).\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n",
|
|
77
85
|
"glyph-out-of-range": "# `glyph-out-of-range`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`FontRegistry::use_glyph` was given a glyph ID at or past the font's glyph count.\n\n## Why\n\nGlyph IDs must come from the same font (its `cmap` or a shaper run on it).\n\n## How to fix\n\nPass glyph IDs from the font you registered.\n\n## Example\n\n```rust\nregistry.use_glyph(key, GlyphId::new(60_000), \"x\")?; // the font has 1,200 glyphs\n```\n\n## Data fields\n\n- `gid`: the glyph ID.\n- `count`: the font's glyph count.\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n",
|
|
78
86
|
"unknown-font": "# `unknown-font`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA `FontKey` was used with a `FontRegistry` that did not hand it out.\n\n## Why\n\nKeys are indices into one registry; each document has its own.\n\n## How to fix\n\nUse the key returned by this registry's `add`.\n\n## Example\n\n```rust\nlet key = registry_a.add(font, EmbedPolicy::Respect)?;\nregistry_b.encode(key, \"Hi\")?; // unknown-font: key came from registry_a\n```\n\n## Data fields\n\n- `key`: the key's index.\n",
|
|
79
87
|
"subset-failed": "# `subset-failed`\n\n- Type: error\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nSubsetting a font at `FontRegistry::finish_fonts` failed.\n\n## Why\n\nThe `subsetter` crate could not rebuild the font program: a font feature it does not support, or a table it could not parse.\n\n## How to fix\n\nTry another version or format of the font (for example TrueType instead of CFF), and report the font if it is a common one.\n\n## Example\n\nA font whose tables `subsetter` can't rebuild makes `FontRegistry::finish_fonts` (and so `Builder::finish`) fail with `subset-failed`; `data.font` is the font's PostScript name.\n\n## Data fields\n\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n- `reason`: the subsetter's failure class (fixed text).\n",
|
|
80
|
-
"invalid-axis-value": "# `invalid-axis-value`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Font::instance` was given a NaN or infinite axis value.\n\n## Why\n\nVariation coordinates are user-space numbers such as `wght` 700; NaN and infinities have no position on an axis.\n\n## How to fix\n\nPass finite values; values outside the axis range are clamped, so there is no need for infinities.\n\n## Example\n\n```rust\nfont.instance(&[(
|
|
88
|
+
"invalid-axis-value": "# `invalid-axis-value`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Font::instance` was given a NaN or infinite axis value.\n\n## Why\n\nVariation coordinates are user-space numbers such as `wght` 700; NaN and infinities have no position on an axis.\n\n## How to fix\n\nPass finite values; values outside the axis range are clamped, so there is no need for infinities.\n\n## Example\n\n```rust\nfont.instance(&[(OpenTypeTag::WEIGHT, f32::NAN)])?; // invalid-axis-value\n```\n\n## Data fields\n\n- `tag`: the axis.\n",
|
|
81
89
|
"wrong-document": "# `wrong-document`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`FontRegistry::finish_fonts` was given a document in which a font's reserved object is not a free number reserved in that document.\n\n## Why\n\nA `FontRegistry` belongs to one document: `reference` reserves numbers in the document it is given, and `finish_fonts` fills those numbers. Finishing into another document would overwrite its objects, so nothing is written.\n\n## How to fix\n\nUse one `FontRegistry` per document, and pass `finish_fonts` the document its `reference` calls used.\n\n## Example\n\n```rust\nlet id = registry.reference(key, &doc_a)?;\nregistry.finish_fonts(&mut doc_b.edit())?; // wrong-document: the fonts were reserved in doc_a\n```\n\n## Data fields\n\n- `object`: the reserved object number.\n",
|
|
82
|
-
"invalid-feature": "# `invalid-feature`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nAn OpenType feature setting given to the shaper (`\"liga=0\".parse::<Feature>()`) did not parse.\n\n## Why\n\nFeature settings use HarfBuzz's syntax without ranges: `tag` or `+tag` (on), `-tag` (off), `tag=N`, `tag=on` or `tag=off`, where the tag is one to four printable ASCII characters. A sign together with a value (`+liga=1`), an empty or longer tag, or a value that is not a non-negative integer is refused.\n\n## How to fix\n\nWrite the setting as `liga=0`, `-liga`, `smcp` or `aalt=2`, or build it with `Feature::new(
|
|
90
|
+
"invalid-feature": "# `invalid-feature`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nAn OpenType feature setting given to the shaper (`\"liga=0\".parse::<Feature>()`) did not parse.\n\n## Why\n\nFeature settings use HarfBuzz's syntax without ranges: `tag` or `+tag` (on), `-tag` (off), `tag=N`, `tag=on` or `tag=off`, where the tag is one to four printable ASCII characters. A sign together with a value (`+liga=1`), an empty or longer tag, or a value that is not a non-negative integer is refused.\n\n## How to fix\n\nWrite the setting as `liga=0`, `-liga`, `smcp` or `aalt=2`, or build it with `Feature::new(OpenTypeTag::new(b\"liga\"), 0)`.\n\n## Example\n\n```rust\nlet f: Feature = \"liga[3:5]=0\".parse()?; // invalid-feature: ranges are not supported\n```\n\n## Data fields\n\n- `feature`: the setting as given (**untrusted**: caller text).\n",
|
|
83
91
|
"invalid-text-range": "# `invalid-text-range`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA byte range of a text given to `Shaper::shape_range`, `BidiParagraph::visual_runs` or `BidiParagraph::line_levels`, or the range of a `ShapedRun` given to `pdf_run`, is past the end of the text or does not start and end on character boundaries.\n\n## Why\n\nRanges are byte offsets into UTF-8 text; a range that cuts a character in two (or reaches past the end) names no text.\n\n## How to fix\n\nTake ranges from Lamina PDF's own results (`line_breaks`, `itemize`, `break_lines`, `ShapedRun::text_range`), or check them with `str::get` first, and pass the same text the range was computed on.\n\n## Example\n\n```rust\nshaper.shape_range(&font, \"héllo\", 0..2, &options)?; // byte 2 is inside 'é'\n```\n\n## Data fields\n\n- `start`, `end`: the range (bytes).\n- `len`: the text's length (bytes).\n",
|
|
92
|
+
"invalid-spans": "# `invalid-spans`\n\n- Type: error\n- Kind: `usage` (the caller passed something invalid)\n\n## What happened\n\nThe styled spans passed to `break_spans` don't cover the paragraph's text exactly once, in order, or name fonts it can't use. One of these is true:\n\n- two spans leave a gap, overlap, or come out of order;\n- the last span stops before the end of the text, or runs past it;\n- a span starts or ends inside a character, or between a letter and its accent;\n- a span lists no fonts, or a font index past the end of the list.\n\n## Why\n\nEach character's font, size and language come from the span that holds it. A character in no span, or in two, would have no style or two styles, so Lamina PDF refuses the spans rather than guess. A letter and its accent are drawn as one glyph cluster, so they can't take two styles. An index past the end of the font list names no font.\n\n## How to fix\n\nList the spans in the order of the text. Start the first at byte 0, start each span where the one before it ends, and end the last at the text's length. Take span ends from `grapheme_boundaries` or `str::len`, so that they fall between clusters. List at least one font per span, each an index into the font list. An empty text needs no spans.\n\n## Example\n\n```rust\nlet text = \"Hello, world\";\nlet spans = [StyledSpan::new(0..5), StyledSpan::new(6..12)]; // byte 5 is in no span\nbreak_spans(&shaper, &fonts, text, &spans, &options)?; // invalid-spans\n```\n\n## Data fields\n\n- `at`: the byte offset where the spans stop covering the text, or where the span with a bad font list starts.\n",
|
|
84
93
|
"unsupported-layout-option": "# `unsupported-layout-option`\n\n- Type: error\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\n`break_lines` was given a layout option Lamina PDF does not implement yet: `LayoutOptions::justify` set to `true`.\n\n## Why\n\nJustification (stretching inter-word gaps, kashida) is reserved for a later plan (research 03 §7.6); silently ignoring the option would lay out ragged lines the caller did not ask for.\n\n## How to fix\n\nLeave `justify` at `false` and pick an `Alignment` (start, end, left, right or centre).\n\n## Example\n\n```rust\nlet options = LayoutOptions { justify: true, ..LayoutOptions::new(300.0, 12.0) };\nbreak_lines(&shaper, &fonts, text, &options)?; // unsupported-layout-option\n```\n\n## Data fields\n\n- `option`: the option's name (fixed text).\n",
|
|
85
94
|
"font-mismatch": "# `font-mismatch`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`pdf_run` was given a shaped run and the key of a font other than the one the run was shaped with. Nothing was recorded in the registry.\n\n## Why\n\nGlyph IDs, advances and units per em only mean something in the font that produced them; drawing them with another font would show the wrong glyphs and wrong text.\n\n## How to fix\n\nRegister every font of a layout and pass the key of the run's own font: each `LineRun::font` is an index into the font list given to `break_lines`.\n\n## Example\n\n```rust\nlet run = shaper.shape(¬o, text, &options)?;\npdf_run(&run, text, &mut registry, roboto_key)?; // font-mismatch: shaped with Noto\n```\n\n## Data fields\n\n- `font`: the registered font's PostScript name (**untrusted**: read from the font).\n- `shaped_with`: the PostScript name of the font the run was shaped with (**untrusted**: read from the font).\n",
|
|
86
|
-
"encoding-full": "# `encoding-full`\n\n- Type: error\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nA standard 14 font had no free one-byte code left for another glyph in this document.\n\n## Why\n\nA standard 14 font is a simple font: text is written one byte per character, so one font resource addresses at most 256 glyphs (ISO 32000-2 §9.6.5). Lamina PDF writes the Latin fonts in `WinAnsiEncoding`, and gives each glyph of the standard Latin character set outside it (`Lslash`, `Scedilla`, `minus`, …) one of the 37 codes `WinAnsiEncoding` leaves undefined, through `/Differences
|
|
87
|
-
"font-not-shapable": "# `font-not-shapable`\n\n- Type: error\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nA standard 14 font (`Font::standard`) was given to the shaper, `itemize`, `break_lines` or `pdf_run`.\n\n## Why\n\nThe standard 14 fonts are referred to by name and never embedded
|
|
95
|
+
"encoding-full": "# `encoding-full`\n\n- Type: error\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nA standard 14 font had no free one-byte code left for another glyph in this document.\n\n## Why\n\nA standard 14 font is a simple font: text is written one byte per character, so one font resource addresses at most 256 glyphs (ISO 32000-2 §9.6.5). Lamina PDF writes the Latin fonts in `WinAnsiEncoding`, and gives each glyph of the standard Latin character set outside it (`Lslash`, `Scedilla`, `minus`, …) one of the 37 codes `WinAnsiEncoding` leaves undefined, through `/Differences`.\n\nA document that draws more such glyphs with one font than there are free codes runs out. Assignment is all or nothing: when one `encode` call needs more new codes than are free, none are assigned and nothing of the text is recorded.\n\n## How to fix\n\nEmbed a font (`Font::from_bytes`), which addresses every glyph through a Type 0 font, or split the text across two registrations of the standard font (each is its own font resource with its own codes).\n\n## Example\n\nDrawing more than 37 different non-WinAnsi Latin glyphs (Ā, ă, Ą, …) with `Standard14::Helvetica` in one document: the 38th has no free code in the font's `/Differences`, so the call fails with `encoding-full`.\n\n## Data fields\n\n- `font`: the standard font's PostScript name (fixed text: one of the fourteen).\n- `limit`: how many codes `/Differences` can assign for this font.\n- `free`: how many of them were still free; the text needed more, so none were assigned.\n",
|
|
96
|
+
"font-not-shapable": "# `font-not-shapable`\n\n- Type: error\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nA standard 14 font (`Font::standard`) was given to the shaper, `itemize`, `break_lines` or `pdf_run`.\n\n## Why\n\nThe standard 14 fonts are referred to by name and never embedded. Lamina PDF has their metrics (Adobe's AFM files) but no font program, so there is nothing for HarfRust to shape with and no `cmap` for itemizing. Nor are there CIDs for a shaped run: a standard 14 font is written as a simple font with one-byte codes.\n\n## How to fix\n\nDraw standard 14 text with `FontRegistry::encode` (one glyph per character, kerning not applied), or load a real font with `Font::from_bytes` and shape with it.\n\n## Example\n\n```rust\nlet helvetica = Font::standard(Standard14::Helvetica);\nshaper.shape(&helvetica, \"Hello\", &options)?; // font-not-shapable\n```\n\n## Data fields\n\n- `font`: the standard font's PostScript name (fixed text: one of the fourteen).\n",
|
|
88
97
|
"tounicode-conflict": "# `tounicode-conflict`\n\n- Type: warning\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nOne glyph was used for two different texts; the ToUnicode CMap maps it to the first.\n\n## Why\n\nA ToUnicode CMap maps each code to one string (ISO 32000-2 §9.10.3), for example when one space glyph stands for both U+0020 and U+00A0.\n\n## How to fix\n\nMark the second occurrence with `/ActualText` (§14.9.4) so extraction gets its text; Lamina PDF's builder does this for you.\n\n## Example\n\nA CFF font in which one space glyph is used for both U+0020 and U+00A0: the ToUnicode CMap maps it to U+0020 (the first use), and the warning names the glyph (`gid`) and the second text.\n\n## Data fields\n\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n- `gid`: the glyph, in the original font's numbering.\n- `kept`, `dropped`: the two texts (**untrusted**: caller text).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [B5b](../todos/done/B5b-builder-text-and-document-features.md): the builder marks repeated glyphs\n",
|
|
89
|
-
"whole-font-rebuilt": "# `whole-font-rebuilt`\n\n- Type: warning\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA font whose `OS/2.fsType` forbids subsetting was embedded with every glyph, but rebuilt rather than byte for byte.\n\n## Why\n\nIt is a variable-font instance or has CFF2 outlines; PDF can embed neither as it is, so `subsetter` instanced it (or converted CFF2 to TrueType outlines) while keeping every glyph. Its `cmap` and layout tables are dropped.\n\n## How to fix\n\nCheck the font's licence allows this, or use a static TrueType/CFF version of the font.\n\n## Example\n\nRegistering a variable font instance (`font.instance(&[(
|
|
98
|
+
"whole-font-rebuilt": "# `whole-font-rebuilt`\n\n- Type: warning\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA font whose `OS/2.fsType` forbids subsetting was embedded with every glyph, but rebuilt rather than byte for byte.\n\n## Why\n\nIt is a variable-font instance or has CFF2 outlines; PDF can embed neither as it is, so `subsetter` instanced it (or converted CFF2 to TrueType outlines) while keeping every glyph. Its `cmap` and layout tables are dropped.\n\n## How to fix\n\nCheck the font's licence allows this, or use a static TrueType/CFF version of the font.\n\n## Example\n\nRegistering a variable font instance (`font.instance(&[(OpenTypeTag::WEIGHT, 700.0)])`) whose `fsType` forbids subsetting: the font is embedded with every glyph, but instanced, so not byte for byte.\n\n## Data fields\n\n- `font`: the font's PostScript name (**untrusted**: read from the font).\n",
|
|
90
99
|
"invalid-image": "# `invalid-image`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\n`Image::jpeg`, `Image::png` or `Image::png_with` (`laminapdf-build`) could not read the bytes as an image of that format.\n\n## Why\n\nA JPEG must start with a start-of-image marker and have a frame header (SOF) before its first scan, with every marker segment inside the data; a PNG must decode without errors (signature, chunk CRCs, zlib data, sizes).\n\n## How to fix\n\nPass the complete file. Check that the bytes are the format you called (a PNG passed to `Image::jpeg` fails here).\n\n## Example\n\n```rust\nlet img = Image::jpeg(std::fs::read(\"photo.png\")?)?; // invalid-image: PNG bytes given as JPEG\n```\n\n## Data fields\n\n- `format`: `Jpeg`, `Png` or `Rgba`.\n- `reason`: what was wrong (fixed text).\n",
|
|
91
100
|
"unsupported-image": "# `unsupported-image`\n\n- Type: error\n- Kind: `unsupported` (valid input that Lamina PDF doesn't implement)\n\n## What happened\n\nThe image is valid but uses a feature the builder can't embed.\n\n## Why\n\nPDF's `DCTDecode` filter (ISO 32000-2 §7.4.8) takes baseline and progressive JPEG with 8-bit samples; lossless, hierarchical and arithmetic-coded JPEG and 12-bit samples are refused, as are JPEGs with 2 or more than 4 components.\n\n## How to fix\n\nRe-encode the image as a baseline or progressive 8-bit JPEG, or as PNG.\n\n## Example\n\n```rust\nlet img = Image::jpeg(lossless_jpeg_bytes)?; // unsupported-image: data.feature says which\n```\n\n## Data fields\n\n- `format`: the image's format.\n- `feature`: the feature that is not supported (fixed text).\n",
|
|
92
101
|
"image-too-large": "# `image-too-large`\n\n- Type: error\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nDecoding a PNG would need more than `MAX_DECODED_IMAGE_BYTES` (256 MiB), or the dimensions given to `Image::rgba` describe more bytes than fit in memory's address space.\n\n## Why\n\nThe builder decodes PNGs to split colour and alpha; a bound on the decoded size keeps a small file with huge dimensions from exhausting memory.\n\n## How to fix\n\nScale the image down before adding it, or use a JPEG, which is embedded without decoding.\n\n## Example\n\n```rust\nlet img = Image::png(&png_of_30000_by_30000_pixels)?; // image-too-large: over 256 MiB decoded\n```\n\n## Data fields\n\n- `limit`: the limit in decoded bytes.\n",
|
|
93
102
|
"image-data-length": "# `image-data-length`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Image::rgba(width, height, bytes)` was given a number of bytes other than `width × height × 4`.\n\n## Why\n\nRaw RGBA samples are 4 bytes per pixel, row by row from the top, with no padding.\n\n## How to fix\n\nPass exactly 4 bytes per pixel.\n\n## Example\n\n```rust\nlet img = Image::rgba(2, 2, &[0; 12])?; // image-data-length: 16 bytes expected\n```\n\n## Data fields\n\n- `expected`: the length the dimensions call for.\n- `actual`: the length given.\n",
|
|
94
|
-
"invalid-icc-profile": "# `invalid-icc-profile`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\n`IccProfile::new` (`laminapdf-build`) rejected the bytes.\n\n## Why\n\nAn ICC profile (ICC.1:2010) starts with a 128-byte header holding its size, the `acsp` signature, its class and its data colour space. PDF's `ICCBased` colour spaces (ISO 32000-2 §8.6.5.5) take Gray, RGB, CMYK and Lab profiles
|
|
103
|
+
"invalid-icc-profile": "# `invalid-icc-profile`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\n`IccProfile::new` (`laminapdf-build`) rejected the bytes.\n\n## Why\n\nAn ICC profile (ICC.1:2010) starts with a 128-byte header holding its size, the `acsp` signature, its class and its data colour space. PDF's `ICCBased` colour spaces (ISO 32000-2 §8.6.5.5) take Gray, RGB, CMYK and Lab profiles. The builder takes Gray, RGB and CMYK: Lab components fall outside `[0, 1]` and need a `/Range`, which it doesn't support yet. Device-link, abstract and named-colour profiles can't be used.\n\n## How to fix\n\nPass the complete bytes of an input, display, output or colour-space profile with a Gray, RGB or CMYK data colour space.\n\n## Example\n\n```rust\nlet profile = IccProfile::new(b\"not a profile\".to_vec())?; // invalid-icc-profile\n```\n\n## Data fields\n\n- `reason`: what was wrong (fixed text).\n",
|
|
95
104
|
"color-components": "# `color-components`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Color::icc` was given a number of components that differs from the profile's channel count.\n\n## Why\n\nAn `ICCBased` colour has one component per channel of its profile (`/N`: Gray 1, RGB and Lab 3, CMYK 4).\n\n## How to fix\n\nGive `IccProfile::components()` values.\n\n## Example\n\n```rust\nlet c = Color::icc(&cmyk_profile, &[0.1, 0.2, 0.3])?; // color-components: 4 expected\n```\n\n## Data fields\n\n- `expected`: the colour space's number of components.\n- `actual`: how many were given.\n",
|
|
96
105
|
"invalid-color": "# `invalid-color`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Color::hex` was given a string that is not `#rgb` or `#rrggbb`.\n\n## Why\n\nHex colours are a `#` followed by three or six hexadecimal digits, in either case.\n\n## How to fix\n\nWrite the colour as `#3366cc` or `#36c`, or use `Color::rgb`.\n\n## Example\n\n```rust\nlet c = Color::hex(\"#12345\")?; // invalid-color: 5 digits\n```\n\n## Data fields\n\n- `text`: the string as given (untrusted: caller text, never in the message).\n",
|
|
97
|
-
"invalid-geometry": "# `invalid-geometry`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA page size, page box, `/UserUnit`, drawing value or image size given to the builder is not usable. Drawing values are checked as the `Surface` receives them and the first bad one is reported by `PageBuilder::finish`.\n\n## Why\n\nPage sizes and `/UserUnit` must be finite and positive, page boxes, path coordinates, matrices and image rectangles finite
|
|
106
|
+
"invalid-geometry": "# `invalid-geometry`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA page size, page box, `/UserUnit`, drawing value or image size given to the builder is not usable. Drawing values are checked as the `Surface` receives them and the first bad one is reported by `PageBuilder::finish`.\n\n## Why\n\nPage sizes and `/UserUnit` must be finite and positive, and page boxes, path coordinates, matrices and image rectangles finite. Line widths and dash lengths must be finite and not negative, and a dash pattern not all zeros (ISO 32000-2 §8.4.3.6). Miter limits must be at least 1, images at least one pixel wide and tall, font sizes and line heights positive, text boxes wider than 0, and destination coordinates finite.\n\n## How to fix\n\nCheck the values passed to `Builder::page`, `PageBuilder::user_unit`, the box setters, the `Surface` (paths, `transform`, `StrokeStyle`, `image`, `text` and `text_box` sizes, positions, boxes and line heights, `link` rectangles), destinations (`Fit` coordinates) and `Image::rgba`.\n\n## Example\n\n```rust\nlet page = builder.page(PageSize::new(Pt::new(0.0), Pt::new(842.0))); // invalid-geometry at finish\n```\n\n## Data fields\n\n- `what`: which value was invalid (fixed text).\n",
|
|
98
107
|
"text-overflow": "# `text-overflow`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Surface::text_box` laid its text out and not every line fit the box (its height, or a single grapheme cluster wider than the box), and its `TextBoxOptions` asked for `Overflow::Error`. Nothing was drawn.\n\n## Why\n\nA text box draws only lines that fit inside it. With `Overflow::Error` the caller asked to be told instead of having the text cut off.\n\n## How to fix\n\nMake the box taller or wider, the font smaller or the text shorter; or use `Overflow::Clip` (the default), which draws the lines that fit and reports where the rest starts in `TextLayout::overflow`.\n\n## Example\n\n```rust\nlet options = TextBoxOptions::default().with_overflow(Overflow::Error);\nsurface.text_box(long_text, &font, Pt::new(12.0), small_rect, &options)?; // text-overflow\n```\n\n## Data fields\n\n- `fits`: the number of lines that fit.\n- `needed`: the number of lines the text needs.\n",
|
|
99
108
|
"page-index-out-of-range": "# `page-index-out-of-range`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA link (`LinkTarget::Page`), an outline item or a named destination (`Builder::destination`) names a page index the document doesn't have when the build finishes.\n\n## Why\n\nPage targets are resolved when `Builder::finish` (or `Appender::finish`) runs, so a link can name a page added after its own; by then every index must be one of the document's pages. Indexes are 0-based.\n\n## How to fix\n\nUse an index below the document's page count, or add the page before finishing.\n\n## Example\n\n```rust\nsurface.link(rect, LinkTarget::Page { index: 5, fit: Fit::Page }, None);\nbuilder.finish()?; // page-index-out-of-range: the document has 2 pages\n```\n\n## Data fields\n\n- `index`: the 0-based index given.\n- `count`: the number of pages.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0027](../decisions/0027-coordinates-units-and-page-indexing.md) §6\n",
|
|
100
109
|
"unknown-destination": "# `unknown-destination`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA link or outline item of a new document targets `LinkTarget::Named(name)`, but `Builder::destination` never defined that name.\n\n## Why\n\nA named destination is looked up in the document's `/Names /Dests` tree (ISO 32000-2 §12.3.2.4); a name that isn't there goes nowhere in every viewer.\n\n## How to fix\n\nDefine the name with `Builder::destination(name, page_index, fit)` before `Builder::finish`, or link to the page directly with `LinkTarget::Page`.\n\n## Example\n\n```rust\nsurface.link(rect, LinkTarget::Named(\"appendix\".into()), None);\nbuilder.finish()?; // unknown-destination: call builder.destination(\"appendix\", …) first\n```\n\n## Data fields\n\n- `name`: the name as given (untrusted: caller text, never in the message).\n",
|
|
101
110
|
"invalid-page-labels": "# `invalid-page-labels`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nThe ranges given to `Builder::page_labels` can't be written as a `/PageLabels` number tree.\n\n## Why\n\nISO 32000-2 §7.7.2 and §12.4.2: the tree must have an entry for page index 0, its keys are page indexes in increasing order, and a label range's first number (`/St`) is at least 1. A range starting past the document's last page would label nothing.\n\n## How to fix\n\nGive the ranges sorted by first page, the first starting at page 0, each start a page of the document, and numbers from 1 (`PageLabel::with_first`).\n\n## Example\n\n```rust\nbuilder.page_labels([PageLabel::new(1, Some(LabelStyle::Decimal))]); // invalid-page-labels at finish: no range starts at page 0\n```\n\n## Data fields\n\n- `what`: what is wrong (fixed text).\n",
|
|
111
|
+
"tag-element-not-open": "# `tag-element-not-open`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Surface::resume` or `Builder::close_element` was given a structure element that isn't open. When `resume` names one, the page's `PageBuilder::finish` fails.\n\n## Why\n\nAn element that continues across pages is open from `Surface::open_element` until `Builder::close_element` writes it, and only then. The element named was one of these:\n\n- closed already;\n- opened by another builder;\n- opened inside an artifact, so it is part of the artifact (ISO 32000-2 §14.8.2.2);\n- opened on a page added to an existing document, which is never tagged;\n- opened on a page whose `PageBuilder::finish` failed, so it was never written.\n\n## How to fix\n\nOpen the element on a page of the same builder, outside every artifact, and close it once, after its last page is finished.\n\n## Example\n\n```rust\nlet paragraph = page.surface().open_element(TagKind::P);\npage.finish()?;\nbuilder.close_element(paragraph)?;\nbuilder.close_element(paragraph)?; // tag-element-not-open: closed already\n```\n\n## Data fields\n\nNone.\n",
|
|
112
|
+
"tag-element-unclosed": "# `tag-element-unclosed`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Builder::finish` was called while structure elements opened with `Surface::open_element` were still open.\n\n## Why\n\nAn element that continues across pages is written when `Builder::close_element` closes it, since only then is its content complete. An element never closed would leave the structure tree with a reference to an element that doesn't exist (ISO 32000-2 §14.7.2), so the build stops instead.\n\n## How to fix\n\nClose every element from `Surface::open_element` with `Builder::close_element` once its last page is finished, before `Builder::finish`.\n\n## Example\n\n```rust\nlet paragraph = page.surface().open_element(TagKind::P);\npage.finish()?;\nbuilder.finish()?; // tag-element-unclosed: the paragraph is still open\n```\n\n## Data fields\n\n- `count`: how many elements are still open.\n",
|
|
102
113
|
"profile-version-conflict": "# `profile-version-conflict`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`BuildOptions::with_version(PdfVersion::V2_0)` was combined with a conformance profile (`BuildOptions::with_profile`) that is built on PDF 1.7. `Builder::finish` wrote nothing.\n\n## Why\n\nThe PDF/UA-1 standard for accessible PDF (ISO 14289-1) and the PDF/A-2 and PDF/A-3 archival standards (ISO 19005-2 and -3) build their rules on ISO 32000-1, which is PDF 1.7. A file that says it is PDF 2.0 can't conform to them. Validators such as veraPDF, the open-source PDF/A and PDF/UA validator, check the header first.\n\n## How to fix\n\nLeave the version at its default, 1.7 (or choose a lower one: the builder raises it to what the content needs). PDF 2.0 has its own profiles, PDF/A-4 and PDF/UA-2, which Lamina PDF doesn't write yet.\n\n## Example\n\n```rust\nlet options = BuildOptions::default()\n .with_version(PdfVersion::V2_0)\n .with_profile(Profile::PdfA2b);\nBuilder::new(options).finish()?; // profile-version-conflict\n```\n\n## Data fields\n\n- `profile`: the profile, such as `PDF/A-2b`.\n",
|
|
103
114
|
"missing-title": "# `missing-title`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA PDF/UA-1 document (`Profile::PdfUa1`) reached `Builder::finish` without a title: `Builder::metadata` was never called, or its `Metadata` has no title, or the title is blank.\n\n## Why\n\nA screen reader announces the title first, so a document without one is hard to tell apart from others. The PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.1) requires a title in the document's metadata. The title is `dc:title` in the XMP packet, the XML metadata stream that the builder writes from `Metadata`. The standard also asks viewers to show the title in the title bar instead of the file name (`/DisplayDocTitle`, which the builder writes for you). This is condition 06-003 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nGive the document a title that says what it is.\n\n## Example\n\n```rust\nbuilder.metadata(Metadata::default().with_title(\"Quarterly report, Q3 2026\"));\n```\n\n## Data fields\n\nNone.\n",
|
|
104
115
|
"missing-lang": "# `missing-lang`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA PDF/UA-1 document (`Profile::PdfUa1`) reached `Builder::finish` without a natural language: `Builder::lang` was never called, or was given a blank tag.\n\n## Why\n\nA screen reader picks its voice and pronunciation from the document's language (`/Lang` in the catalog, ISO 32000-2 §14.9.2). The PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.2) requires that the language of all text can be determined. These are conditions 11-001 and 11-006 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nSet the document's language with a BCP 47 tag, the standard language code of the web, such as `en-GB` or `fr`. Text in another language can carry its own tag with `Tag::with_lang`.\n\n## Example\n\n```rust\nbuilder.lang(\"en-GB\");\n```\n\n## Data fields\n\nNone.\n",
|
|
@@ -110,29 +121,52 @@ export const PAGES = {
|
|
|
110
121
|
"link-without-structure": "# `link-without-structure`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder PDF/UA-1, a link annotation has no `Link` structure element. The builder gives every link one automatically, except a link drawn inside an artifact, which stays outside the structure.\n\n## Why\n\nA screen reader finds links through the structure tree, so a link inside decoration can't be reached. The PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.18.5) requires each link annotation to be nested in a `Link` element. This is condition 28-011 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nDraw the link outside `Surface::artifact`, next to the text it belongs to; the builder then wraps it in a `Link` element.\n\n## Example\n\n```rust\nsurface.artifact(ArtifactKind::Layout, |s| {\n s.link(rect, LinkTarget::Uri(\"https://example.com\".into()), Some(\"Example\".into()));\n Ok(())\n})?;\nbuilder.finish()?; // link-without-structure\n```\n\n## Data fields\n\n- `page`: the page's index (0-based).\n- `count`: how many links on that page lack a `Link` element.\n",
|
|
111
122
|
"link-without-contents": "# `link-without-contents`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder PDF/UA-1, a link annotation has no description: `Surface::link` or `TextRun::link` was called with `None` (or an empty string) as its contents.\n\n## Why\n\nA screen reader announces a link by its `/Contents`, its alternate description. The PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.18.5) requires one on every link. This is condition 28-012 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nPass a short description of where the link goes as the link's contents.\n\n## Example\n\n```rust\nsurface.link(rect, LinkTarget::Uri(\"https://example.com/pay\".into()), None);\nbuilder.finish()?; // link-without-contents: pass Some(\"Pay the invoice online\".into())\n```\n\n## Data fields\n\n- `page`: the page's index (0-based).\n",
|
|
112
123
|
"font-not-embedded": "# `font-not-embedded`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nText was drawn with one of the standard 14 fonts (`Builder::standard_font`) under PDF/UA-1 or a PDF/A profile. The standard 14 fonts are never embedded: viewers substitute their own.\n\n## Why\n\nThe PDF/A standard for archival PDF (ISO 19005-2 §6.2.11.4.1) needs every font embedded, so the document looks the same everywhere in the future. The PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.21.4.1) needs it too, so viewers can render the text and map it to characters reliably. This is condition 31-009 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nLoad a font file with `Builder::font` (or `Builder::font_bytes` in the façade): Lamina PDF embeds the subset of glyphs you draw.\n\n## Example\n\n```rust\nlet bold = builder.standard_font(Standard14::HelveticaBold)?;\nsurface.text(\"Invoice\", &bold, Pt::new(24.0), at)?;\nbuilder.finish()?; // font-not-embedded under Profile::PdfA2b\n```\n\n## Data fields\n\n- `profile`: the profile, such as `PDF/A-2b`.\n- `font`: the font's PostScript name, such as `Helvetica-Bold`.\n",
|
|
113
|
-
"glyph-without-unicode": "# `glyph-without-unicode`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder PDF/A-2u or PDF/UA-1, a glyph was drawn
|
|
124
|
+
"glyph-without-unicode": "# `glyph-without-unicode`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder PDF/A-2u or PDF/UA-1, a glyph was drawn with no Unicode value, or with one that holds U+0000, U+FEFF or U+FFFE.\n\nA glyph that maps to the empty value doesn't fail. Shaping can draw one character with several glyphs: Noto Sans Arabic draws a beh as a dotless body and a dot. The body then carries the letter and the dot maps to the empty value, so the letter is read once.\n\n## Why\n\nSoftware can search, copy or read text aloud only when every glyph maps to a usable Unicode value. The PDF/A-2u archival standard (ISO 19005-2 §6.2.11.7.2) and the PDF/UA-1 standard for accessible PDF (ISO 14289-1 §7.21.7) both need that mapping. These are conditions 31-027 to 31-029 of the Matterhorn Protocol, the PDF Association's checklist of PDF/UA failures.\n\n## How to fix\n\nRemove the NUL characters (U+0000) from the text, and check what it was decoded from: a NUL usually means a UTF-16 string read as UTF-8, or the end of a C string. An archive that needs no accessibility can use PDF/A-2b instead, which doesn't need Unicode for every glyph. PDF/UA-1 has no such relaxed variant.\n\n## Example\n\n```rust\nsurface.text(\"\\u{0}Report\", &font, Pt::new(12.0), at)?;\nbuilder.finish()?; // glyph-without-unicode under Profile::PdfA2u\n```\n\n## Data fields\n\n- `profile`: the profile, `PDF/A-2u` or `PDF/UA-1`.\n- `font`: the font's PostScript name (untrusted: read from the font file).\n- `gid`: the glyph's ID in the font.\n",
|
|
114
125
|
"device-color-without-output-intent": "# `device-color-without-output-intent`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder a PDF/A profile, a page draws with `DeviceCMYK` (CMYK given as plain numbers, with no profile to say which inks they mean): a `Color::cmyk` colour or a CMYK JPEG.\n\n## Why\n\nThe PDF/A standard for archival PDF (ISO 19005) gives device colour a defined meaning through the document's output intent, which Lamina PDF writes as sRGB. That sRGB intent defines device RGB and gray, but not device CMYK, so ISO 19005-2 §6.2.4.3 forbids CMYK under it.\n\n## How to fix\n\nUse `Color::rgb` or `Color::gray`, convert CMYK images to RGB, or give CMYK colours an ICC profile with `Color::icc` (an ICC-based colour carries its own meaning).\n\n## Example\n\n```rust\nsurface.fill_color(Color::cmyk(0.0, 0.5, 1.0, 0.0));\nbuilder.finish()?; // device-color-without-output-intent under Profile::PdfA2b\n```\n\n## Data fields\n\n- `page`: the index (0-based) of the first page that uses `DeviceCMYK`.\n",
|
|
115
126
|
"embedded-file-forbidden": "# `embedded-file-forbidden`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Builder::attach` added a file to a document built under PDF/A-2b or PDF/A-2u.\n\n## Why\n\nThe PDF/A-2 standard for archival PDF (ISO 19005-2 §6.8) allows only attached files that are themselves PDF/A. Lamina PDF can't check what an attachment is, so it rejects every attachment under PDF/A-2 on purpose, PDF/A ones included. The PDF/A-3 standard for archival PDF (ISO 19005-3) allows files of any kind, provided they are associated with the document, which `Builder::attach` does.\n\n## How to fix\n\nChoose `Profile::PdfA3b` for documents that carry files, such as an e-invoice's XML, or leave the attachment out.\n\n## Example\n\n```rust\nlet options = BuildOptions::default().with_profile(Profile::PdfA2b);\nlet mut builder = Builder::new(options);\nbuilder.attach(Attachment::new(\"data.csv\", csv, \"text/csv\"));\nbuilder.finish()?; // embedded-file-forbidden: use Profile::PdfA3b\n```\n\n## Data fields\n\n- `profile`: the profile, such as `PDF/A-2b`.\n",
|
|
116
127
|
"embedded-file-without-mime-type": "# `embedded-file-without-mime-type`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nUnder a PDF/A profile, `Builder::attach` added a file with an empty MIME type. A MIME type names the file's format, such as `text/xml`.\n\n## Why\n\nSoftware reading an archive years later needs to know what each attached file is. The PDF/A-3 standard for archival PDF (ISO 19005-3 §6.8) requires every embedded file to name its MIME type in the `/Subtype` of its stream, and Lamina PDF writes no `/Subtype` for an empty one.\n\n## How to fix\n\nPass the file's MIME type to `Attachment::new`. For bytes of no particular type, use `application/octet-stream`.\n\n## Example\n\n```rust\nlet options = BuildOptions::default().with_profile(Profile::PdfA3b);\nlet mut builder = Builder::new(options);\nbuilder.attach(Attachment::new(\"invoice.xml\", xml, \"\"));\nbuilder.finish()?; // embedded-file-without-mime-type: pass \"text/xml\"\n```\n\n## Data fields\n\n- `profile`: the profile, such as `PDF/A-3b`.\n- `name`: the file's name (untrusted: the caller's text).\n",
|
|
128
|
+
"flow-content-too-large": "# `flow-content-too-large`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Builder::flow` found a figure, a single line of text or a table row taller than the body of a page: the space between the top and bottom margins. No page can hold it, so the flow stopped and added no pages. A line or row counts together with the footnotes it cites, since its notes go at the foot of its page.\n\n## Why\n\nA flow moves a figure to the next page when it doesn't fit, and splits a paragraph only between lines. A figure or a line taller than a whole page would fit on no page at all, and cutting it would hide part of it.\n\n## How to fix\n\nMake the figure narrower with `Figure::with_width`, so its height shrinks with it. For a line, use a smaller text size or a smaller line height. For a footnote, shorten the note or split it into two. Or give the page more room with a taller page size or smaller top and bottom margins.\n\n## Example\n\n```rust\nlet tall = Image::rgba(1, 10, &[0; 40])?; // ten times as tall as it is wide\nlet flow = Flow::new(PageTemplate::new(PageSize::A6)).block(FlowBlock::Figure(Figure::new(tall, \"A bar\")));\nbuilder.flow(&flow)?; // flow-content-too-large\n```\n\n## Data fields\n\n- `what`: what is too tall: `line`, `figure`, `table row`, or `footnote` when a line or table row and its footnotes fit on no page together.\n",
|
|
129
|
+
"flow-layout-unstable": "# `flow-layout-unstable`\n\n- Type: error\n- Kind: `internal` (a bug in Lamina PDF or a broken invariant)\n\n## What happened\n\n`Builder::flow` laid out a flow with a contents page four times, and the page numbers on the contents page still changed. The flow stopped and added no pages.\n\n## Why\n\nA contents page lists each heading with the page it starts on, but those pages aren't known until the flow is laid out. So the flow lays everything out, writes the numbers it found into the contents page, and lays out again to check them. Each entry keeps the same room for its number however wide the number is, so the contents page's length never depends on the numbers, and the second layout finds the same pages.\n\nThe flow still checks up to four layouts. This error means the numbers kept changing anyway, which points to a fault in Lamina PDF's layout rather than in your document.\n\n## How to fix\n\nReport the flow that fails, with the blocks and page template that produce it. Until it is fixed, a page break after the contents block may avoid the error, since the headings after it then start on pages of their own.\n\n## Example\n\n```rust\nlet flow = Flow::new(template)\n .block(FlowBlock::Contents(Contents::new(&style)))\n .block(FlowBlock::PageBreak) // the headings start on their own pages\n .block(FlowBlock::Heading(1, Paragraph::plain(\"Introduction\", &heading)));\nbuilder.flow(&flow)?;\n```\n\n## Data fields\n\nNone.\n",
|
|
130
|
+
"flow-keep-broken": "# `flow-keep-broken`\n\n- Type: warning\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Builder::flow` met blocks it was asked to keep on one page, and together they are taller than a page. The flow split them across pages anyway. Blocks are kept together by a `FlowBlock::Keep` group, or by a heading or a paragraph set to keep with the block after it.\n\n## Why\n\nBlocks that can't fit on one page can't be kept on one page. No layout can keep them together, so the flow doesn't look for one. It lays them out as it would without the rule, and every page still ends on a whole line.\n\n## How to fix\n\nKeep fewer blocks together: split a long `Keep` group into smaller ones, or turn off `keep_with_next` on a paragraph in a long chain. Or make the page taller, or its margins smaller, so the group fits.\n\n## Example\n\n```rust\nlet group = FlowBlock::Keep(vec![long_intro, long_paragraph]); // taller than a page\nlet report = builder.flow(&Flow::new(template).block(group))?;\nassert_eq!(report.warnings[0].code(), \"flow-keep-broken\");\n```\n\n## Data fields\n\n- `page`: the page the blocks start on, counted from 0 within the flow.\n",
|
|
131
|
+
"markdown-html-ignored": "# `markdown-html-ignored`\n\n- Type: warning\n- Kind: `unsupported` (valid input that Lamina PDF can't handle yet)\n\n## What happened\n\n`Builder::markdown` found raw HTML in the Markdown, such as a `<div>` block or an inline `<span>`, left it out of the PDF and laid out the rest as usual. The builder raises one warning for each HTML block and each inline HTML tag.\n\n## Why\n\nMarkdown lets authors mix in HTML, and a browser would draw it. Laying out HTML needs a web page's layout rules, which a PDF builder doesn't have. Rather than print the tags as text, the builder leaves the HTML out and says where it was.\n\n## How to fix\n\nWrite the content in Markdown instead: `**bold**` for `<b>`, a table for `<table>`, an image for `<img>`. If the HTML is only a comment, such as `<!-- draft -->`, remove it or ignore the warning.\n\n## Example\n\n```rust\nlet report = builder.markdown(\"Hello <span>there</span>\\n\", &MarkdownBuildOptions::new())?;\nassert_eq!(report.warnings[0].code(), \"markdown-html-ignored\");\n```\n\n## Data fields\n\n- `offset`: where the HTML starts, as a byte offset into the Markdown.\n",
|
|
132
|
+
"markdown-image-missing": "# `markdown-image-missing`\n\n- Type: warning\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Builder::markdown` met an image, such as ``, whose bytes weren't passed in. It left the image out of the PDF and laid out the rest of the document as usual.\n\n## Why\n\nThe builder reads no files and fetches nothing from the network, so it can only draw images the caller supplies. An image path the options don't list, or a web address, has nothing behind it.\n\n## How to fix\n\nRead the image yourself and pass it with `MarkdownBuildOptions::with_image`, under the same path the Markdown uses.\n\n## Example\n\n```rust\nlet chart = Image::png(&std::fs::read(\"chart.png\")?)?;\nlet options = MarkdownBuildOptions::new().with_image(\"chart.png\", chart);\nbuilder.markdown(\"\\n\", &options)?;\n```\n\n## Data fields\n\n- `offset`: where the image starts, as a byte offset into the Markdown.\n",
|
|
117
133
|
"render-too-large": "# `render-too-large`\n\n- Type: error\n- Kind: `limit` (a configured limit was exceeded)\n\n## What happened\n\nA render backend (`laminapdf-render`) refused a request that is too large. The tile has more than `max_render_pixels` pixels or more than `max_render_side` pixels on a side (the document's `RenderLimits`), or more than 65,535 pixels on a side for hayro. Or, for hayro, which reads the whole file, the input is longer than `max_input_bytes`.\n\n## Why\n\nPage sizes and zoom levels come from files and users, so a render could otherwise ask for a bitmap of any size. The limits are checked before anything is allocated. The defaults are 16,777,216 pixels per tile (4096 × 4096, iOS Safari's per-canvas cap), 16,384 pixels per side and 1 GiB of input.\n\n## How to fix\n\nAt high zoom, render the visible part of the page as tiles of 256 to 512 pixels (`RenderRequest::with_clip`) instead of the whole page. Raise the limits with `RenderOpenOptions::with_limits` only when the larger bitmap is intended.\n\n## Example\n\n```rust\nlet req = RenderRequest::page(0, 1000.0); // a letter page at 1000×: 612,000 × 792,000 pixels\ndoc.render(&req, &mut out, &CancelToken::new())?; // render-too-large\n```\n\n## Data fields\n\n- `width`, `height`: the tile's size (tile limits).\n- `limit`: the limit exceeded.\n- `unit`: `pixels`, `pixels per side` or `pixels per side (hayro)` (tile limits).\n- `len`: the input's length in bytes (the input limit, with `limit`).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0004](../decisions/0004-render-backend.md) §1\n",
|
|
118
134
|
"render-failed": "# `render-failed`\n\n- Type: error\n- Kind: `input` (the input is malformed beyond what tolerance repairs)\n\n## What happened\n\nThe render engine (PDFium or hayro, `laminapdf-render`) could not open the document, or could not draw the page it was asked for.\n\n## Why\n\nThe engines have their own parsers. A file that Lamina PDF repairs may still be too damaged for an engine, or use a feature it can't draw. An engine failure (for example a panic inside hayro) is reported this way too, never as a crash.\n\n## How to fix\n\nCheck the document's warnings: a damaged file is usually reported there too. Try the other backend from the debug menu. If neither can draw the page, report the file with the backend name and version.\n\n## Example\n\n```rust\nlet doc = HayroBackend::new().open(Arc::new(bytes), &RenderOpenOptions::new())?; // render-failed for a file hayro can't parse\n```\n\n## Data fields\n\n- `backend`: `pdfium` or `hayro`.\n- `stage`: `open` or `render`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [C1a](../todos/done/C1a-hayro-parity-spike.md): the hayro parity spike, which saw such a panic once\n",
|
|
119
135
|
"render-backend-unavailable": "# `render-backend-unavailable`\n\n- Type: error\n- Kind: `io` (reading or writing outside Lamina PDF failed)\n\n## What happened\n\nThe PDFium backend (`laminapdf-render-pdfium`) could not load the PDFium library, so nothing can be rendered with it.\n\n## Why\n\nPDFium is bound at runtime, never linked at build time: the library has to be present on the machine. Lamina PDF looks for it only in the folder you name.\n\n## How to fix\n\nShip the PDFium library (`libpdfium.dylib`, `libpdfium.so` or `pdfium.dll`) with your app and pass its folder to `PdfiumBackend::bind(dir)`, or set `LAMINA_PDF_PDFIUM_DIR` to that folder for `PdfiumBackend::from_env()`.\n\n## Example\n\n```rust\nlet backend = PdfiumBackend::from_env()?; // render-backend-unavailable when the library isn't there\n```\n\n## Data fields\n\n- `backend`: `pdfium`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0004](../decisions/0004-render-backend.md) §3\n\nIn a checkout of Lamina PDF, `cargo xtask fetch-pdfium` fetches the pinned build and prints its `LAMINA_PDF_PDFIUM_DIR`.\n",
|
|
136
|
+
"model-failed": "# `model-failed`\n\n- Type: error\n- Kind: `internal` (something failed outside the caller's control)\n\n## What happened\n\nA layout model, an OCR engine or the page renderer that feeds them failed while an extraction was using it. The extraction stopped and returned no partial result.\n\n## Why\n\nModels are plug-ins: the extraction calls the model and the renderer it was given, and stops when either reports an error. The error's message is the plug-in's own, and never holds text from the document.\n\n## How to fix\n\nCheck the plug-in's own logs or setup: a missing weights file, a runtime that failed to load, a page too large to render. To get a result meanwhile, extract without the model; the rules alone still give every page's blocks.\n\n## Example\n\n```rust\nlet options = laminapdf::extract::ExtractOptions::new(); // no models: rules only\nlet extraction = doc.extract(&options)?;\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md) §6\n- [L3c](../todos/done/L3c-model-plugins.md)\n",
|
|
137
|
+
"model-result-unexpected": "# `model-result-unexpected`\n\n- Type: error\n- Kind: `usage` (the call itself is wrong)\n\n## What happened\n\nA model result was handed to an extraction job (`provide`) that wasn't waiting for one, or that was waiting for the other model's result: layout regions when it asked for OCR words, or the reverse.\n\n## Why\n\nA job whose models the host runs stops at each page that needs a result and says which one (`request()`). It takes exactly that result and nothing else, so results can't land on the wrong page.\n\n## How to fix\n\nCall `provide` only while `request()` returns a request, with the result its kind asks for: layout regions for a layout request, OCR words for an OCR request.\n\n## Example\n\n```rust\nwhile let laminapdf::Step::Progress { .. } = job.step(&doc, laminapdf::Budget::UNLIMITED)? {\n if let Some(request) = job.request().cloned() {\n job.provide(run_my_model(&request))?;\n }\n}\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md) §6\n- [L3c](../todos/done/L3c-model-plugins.md)\n",
|
|
138
|
+
"model-needs-host": "# `model-needs-host`\n\n- Type: error\n- Kind: `usage` (the call itself is wrong)\n\n## What happened\n\nAn extraction in one call (`extract`) was given a model whose results only the host can give: a model named as the host's (`ModelSlot::Host`), or a plug-in model with no page renderer to draw the pages it reads.\n\n## Why\n\nA one-call extraction runs to the end without stopping, so it can only use models it can call itself, on pages its renderer draws. A host's model answers through the extraction job, which stops at each page that needs a result.\n\n## How to fix\n\nStep an extraction job and hand it each result: `request()` says which page and resolution it needs, `provide(result)` gives it back. Or give the plug-in model a page renderer, so the extraction calls it between pages.\n\n## Example\n\n```rust\nlet mut job = doc.extract_job(&options)?;\nloop {\n if let laminapdf::Step::Done(extraction) = job.step(&doc, laminapdf::Budget::UNLIMITED)? {\n break extraction;\n }\n if let Some(request) = job.request().cloned() {\n job.provide(run_my_model(&request))?;\n }\n}\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md) §6\n- [L3c](../todos/done/L3c-model-plugins.md)\n",
|
|
120
139
|
"cancelled": "# `cancelled`\n\n- Type: error\n- Kind: `cancelled` (a `CancelToken` stopped the work)\n\n## What happened\n\nThe `CancelToken` passed to a job, or to a run-to-completion call such as `Document::save`, was cancelled. The call returned at its next check: the start of a step, a budget check, or the next object or page of a long loop.\n\n## Why\n\nThe caller (or a host on its behalf: an `AbortSignal`, Ctrl-C, a task cancellation) asked for the work to stop.\n\n## How to fix\n\nNothing: this is the outcome that was asked for. The job is finished, a cancelled save left the document as it was (`Dirty`, nothing written), and a cancelled read returned no partial result. Start a new job with a fresh token to try again.\n\n## Example\n\n```rust\nlet cancel = laminapdf::CancelToken::new();\ncancel.cancel();\nlet err = doc.save_with(&laminapdf::SaveOptions::new(), &cancel).unwrap_err();\nassert_eq!(err.code(), \"cancelled\");\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0028](../decisions/0028-facade-rules-jobs-and-cancellation.md) §5\n",
|
|
121
140
|
"job-finished": "# `job-finished`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\n`step` was called on a job that had already returned its result, failed or been cancelled.\n\n## Why\n\nA job ends with its first `Step::Done`, or with its first error: an error ends the job. A step loop that keeps going after either reaches this.\n\n## How to fix\n\nStop stepping once a step returns `Done` or an error. To run the work again, create a new job.\n\n## Example\n\n```rust\nlet mut job = doc.save_job(&laminapdf::SaveOptions::new());\nwhile let laminapdf::Step::Progress { .. } = job.step(&mut doc, laminapdf::Budget::UNLIMITED)? {}\nassert_eq!(job.step(&mut doc, laminapdf::Budget::UNLIMITED).unwrap_err().code(), \"job-finished\");\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0028](../decisions/0028-facade-rules-jobs-and-cancellation.md) §3\n",
|
|
122
141
|
"document-changed": "# `document-changed`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA job's `step` was given a document other than the one the job was created from, or that document changed since: a committed transaction, an undo, a redo, a save or a rebase. Every step checks the document's instance and revision before any work, and the job is now finished.\n\n## Why\n\nJobs don't borrow the document, so other calls can run between two steps. A save or a read that went on after an edit would mix two states of the document, so the job stops instead.\n\n## How to fix\n\nPass the document the job was created from, don't change it while the job runs, and create a new job after a change. A failed save left the document as it was.\n\n## Example\n\n```rust\nlet mut job = doc.save_job(&laminapdf::SaveOptions::new());\ndoc.apply(vec![laminapdf::Op::from(set_info)])?; // the revision moves on\nassert_eq!(job.step(&mut doc, laminapdf::Budget::UNLIMITED).unwrap_err().code(), \"document-changed\");\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0028](../decisions/0028-facade-rules-jobs-and-cancellation.md) §3\n",
|
|
142
|
+
"revision-index-out-of-range": "# `revision-index-out-of-range`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`Document::open_revision` was asked for a revision the file doesn't have.\n\n## Why\n\nRevisions are numbered from 0, the original file, to one less than `Document::revision_count`, the latest revision. A file that was never updated, or one opened by repairing a broken cross-reference table, has one revision.\n\n## How to fix\n\nAsk for an index below `revision_count()`.\n\n## Example\n\n```rust\nlet count = doc.revision_count()?; // 2\ndoc.open_revision(count, OpenOptions::default())?; // revision-index-out-of-range\n```\n\n## Data fields\n\n- `index`: the index asked for.\n- `count`: how many revisions the file has.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [T2b](../todos/done/T2b-check-failed-redactions.md): `revision_count` and `open_revision`\n",
|
|
143
|
+
"covered-text": "# `covered-text`\n\n- Type: warning\n- Kind: `security` (encryption, permissions or signatures block the call, or look tampered with)\n\n## What happened\n\nA page draws text and then paints something opaque over it: a filled box, an image or an annotation. A reader sees the box, but the text under it is still in the file, so copying, search and every text extractor still get it.\n\n## Why\n\nDrawing a black box over a name is the most common failed redaction. A PDF keeps every glyph its content draws, whatever is painted over it later, so the box hides the words on screen and in print without removing them. Extraction already leaves such text out of its blocks and lists it under `dropped` as `covered`; this warning says how much of it each page has.\n\n## How to fix\n\nRemove the text itself with a tool that deletes what a redaction covers, then save the file as a full rewrite, so no earlier revision keeps it either. If the box is part of the design and the text under it is meant to be there, you can ignore the warning.\n\n## Example\n\nA page draws \"Pay John Smith now.\" and then a black rectangle over \"John Smith\". `laminapdf check` reports `covered-text` for page 0 with `chars` 9, and `laminapdf extract` gives `Pay now.`.\n\n## Data fields\n\n- `chars`: how many characters, spaces left out, the page has under covers.\n- `regions`: how many separate covered passages the page has: one per box over a run of words.\n\nThe `location` has the page's `pageIndex`. The warning never holds the covered text.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0030](../decisions/0030-extraction-output-and-model-plugins.md) §4: hidden text and the `covered` flag\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §8: what `laminapdf check` reports\n- [T2b](../todos/done/T2b-check-failed-redactions.md): the warning\n",
|
|
144
|
+
"redaction-not-applied": "# `redaction-not-applied`\n\n- Type: warning\n- Kind: `security` (encryption, permissions or signatures block the call, or look tampered with)\n\n## What happened\n\nA page has redaction marks (`Redact` annotations, ISO 32000-2 §12.5.6.23) that were never applied. A mark only records what someone meant to remove; until a tool applies it, the text, images and drawings under it are all still in the file.\n\n## Why\n\nEditors such as Acrobat redact in two steps: you mark what to remove, then you apply the marks. A file saved between the two steps looks redacted in some viewers, which draw the mark's overlay, but nothing has been taken out.\n\n## How to fix\n\nApply the redactions in a tool that removes what they cover, then save the file as a full rewrite.\n\n## Example\n\nA page with two redaction marks over a name and an account number, saved before \"Apply redactions\" was chosen. `laminapdf check` reports `redaction-not-applied` for that page with `annotations` 2.\n\n## Data fields\n\n- `annotations`: how many redaction marks the page has.\n\nThe `location` has the page's `pageIndex`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §8: what `laminapdf check` reports\n- [T2b](../todos/done/T2b-check-failed-redactions.md): the warning\n",
|
|
145
|
+
"text-in-earlier-revision": "# `text-in-earlier-revision`\n\n- Type: warning\n- Kind: `security` (encryption, permissions or signatures block the call, or look tampered with)\n\n## What happened\n\nThe file was saved with incremental updates, and an earlier revision holds words that the latest revision has nowhere. Anyone can cut the file back to that revision and read them.\n\n## Why\n\nAn incremental save appends the changes to the end of the file and keeps everything before them (ISO 32000-2 §7.5.6). Deleting a paragraph and saving that way leaves the paragraph in the bytes of the earlier revision. Signing, filling a form and some editors' plain \"Save\" all save incrementally.\n\nNot every removed word is a leak: fixing a typo removes the misspelt word too. The warning states that the earlier text is still in the file; whether that matters depends on what was removed.\n\n## How to fix\n\nSave the file as a full rewrite, which keeps only the latest revision. A signed file loses its signatures that way, so sign it again afterwards.\n\n## Example\n\n`fixtures/corpus/hello-incremental.pdf` first draws \"Hello, World\", and its update replaces that with \"Hello, Update\". `laminapdf check` reports `text-in-earlier-revision` with `revision` 0, `words` 1 and `pages` `[0]`.\n\n## Data fields\n\n- `revision`: the earlier revision's index, 0 for the original file.\n- `words`: how many words that revision has more often than the latest one (only words of two or more letters or digits count).\n- `pages`: the indices of that revision's pages where those words are.\n\nThe warning has no `location`, and it never holds the words themselves.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §8: what `laminapdf check` reports\n- [T2b](../todos/done/T2b-check-failed-redactions.md): the warning and how revisions are compared\n",
|
|
123
146
|
"builder-finished": "# `builder-finished`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA `WasmBuilder` method was called after the builder's `finish`, or a `WasmPageBuilder` was drawn on or finished again after its own `finish` (or after its builder's).\n\n## Why\n\n`finish` hands the work over: a builder's becomes a `WasmDocument`, a page's is written into its builder. Neither holds anything to draw on afterwards.\n\n## How to fix\n\nDraw everything on a page before finishing it, and finish every page before the builder. To build more, create a new page or builder.\n\n## Example\n\n```js\nconst b = new WasmBuilder(undefined);\nconst page = b.page(595, 842);\npage.finish();\npage.save(); // throws { code: \"builder-finished\", … }\n```\n\n## Data fields\n\n- `argument`: always `builder`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §7: the binding owns its pages\n",
|
|
147
|
+
"disposed": "# `disposed`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA `Document`, `Builder` or other handle of `@laminapdf/sdk` was used after `free()` released it, or after the `using` block that held it ended (`Symbol.dispose`). A page or save job is freed with its document, and a builder's page with its builder.\n\n## Why\n\nEach handle owns memory inside the WebAssembly module. Freeing it returns that memory at once, so the handle has nothing left to work on.\n\n## How to fix\n\nFree a handle only after its last use. To keep working with the document, open it again from its bytes, or create a new builder.\n\n## Example\n\n```ts\nconst doc = Document.open(bytes);\ndoc.free();\ndoc.save(); // throws LaminaPdfError { code: \"disposed\", … }\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2b](../todos/done/L2b-disposal-and-memory.md): the check on every handle, and on the pages and save jobs of `@laminapdf/wasm`\n",
|
|
124
148
|
"invalid-argument": "# `invalid-argument`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA value passed from JavaScript to `@laminapdf/wasm` is not of the type its declaration describes. It might be a record with a field of the wrong type, or a string that names no known value (a blend mode, a fill rule, a standard 14 font, an op). It might also be a flat-encoded path cut short, a colour with the wrong number of components, or an ID that isn't 32 hex digits.\n\n## Why\n\nThe `.d.ts` types describe each argument, but JavaScript (and code written without the types) can pass anything. The binding checks each value as it converts it.\n\n## How to fix\n\nPass what the declaration says. When the value names an unknown string, `didYouMean` lists the closest allowed ones; `data.detail` says what the conversion found.\n\n## Example\n\n```js\npage.blendMode(\"multiplly\"); // throws { code: \"invalid-argument\", didYouMean: [\"multiply\"], … }\n```\n\n## Data fields\n\n- `argument`: the parameter that was wrong (`options`, `path`, `mode`, …).\n- `detail`: what the conversion said (untrusted: it may quote the value passed).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §7\n- [ADR 0028](../decisions/0028-facade-rules-jobs-and-cancellation.md) F6\n",
|
|
125
149
|
"source-budget-exceeded": "# `source-budget-exceeded`\n\n- Type: error\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nA sparse source (`WasmSparseSource` in `@laminapdf/wasm`, or a `@laminapdf/sdk` range document) was handed bytes that would make it hold more than the byte budget it was created with. The bytes were not added.\n\n## Why\n\nA range source keeps every byte it has fetched: the document may already have read them, so nothing is evicted. The budget bounds how much of a remote or lazily read file one document may hold in memory.\n\n## How to fix\n\nCreate the source with a larger budget, or fetch less per round: smaller blocks and no readahead. A file that must be read whole (a full rewrite, or a repaired file with no usable xref) needs a budget of at least its size.\n\n## Example\n\n```js\nconst source = new WasmSparseSource(10_000_000, 1_000_000);\nsource.supply(0, new Uint8Array(2_000_000)); // throws { code: \"source-budget-exceeded\", … }\n```\n\n## Data fields\n\n- `argument`: `bytes`.\n- `detail`: how many bytes the source would hold and its budget (Lamina PDF's own numbers).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2c](../todos/done/L2c-range-byte-source.md): the range byte source\n- [ADR 0005](../decisions/0005-document-model.md) §2\n",
|
|
126
150
|
"unknown-option": "# `unknown-option`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nAn options record passed to `@laminapdf/wasm` (`OpenOptionsInit`, `SaveOptionsInit`, `BuildOptionsInit`, …) has a key Lamina PDF doesn't know.\n\n## Why\n\nRecords refuse unknown keys instead of ignoring them, so a misspelt option fails loudly rather than silently doing nothing.\n\n## How to fix\n\nRemove the key or correct its spelling. `didYouMean` lists the known keys within two edits of it.\n\n## Example\n\n```js\nWasmDocument.openBytes(bytes, { pasword: \"secret\" }); // throws { code: \"unknown-option\", didYouMean: [\"password\"], … }\n```\n\n## Data fields\n\n- `argument`: the parameter whose record had the key (`options`, `metadata`, …).\n- `option`: the key given (untrusted: caller text, never in the message).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0028](../decisions/0028-facade-rules-jobs-and-cancellation.md) F6\n- [ADR 0026](../decisions/0026-error-and-diagnostic-contract.md) §1\n",
|
|
127
151
|
"already-initialized": "# `already-initialized`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\n`init()` or `loadText()` of `@laminapdf/sdk` named a source (a URL, `Response`, bytes or `WebAssembly.Module`) for a module that an earlier call had already loaded, or started loading, from another source (or from the default file).\n\n## Why\n\nEach module is instantiated once per JavaScript realm: every document and builder lives in that instance. Loading a second copy from another source would leave two instances whose objects can't be mixed, so the second source is refused rather than silently ignored.\n\n## How to fix\n\nPass the source on the first call only; later calls (from other parts of the app) can call `init()` without one, which waits for the same load. Calling again with the very same source object is allowed.\n\n## Example\n\n```js\nawait init(new URL(\"/wasm/lamina_pdf_base.wasm\", location.href));\nawait init(); // fine: the module is loaded\nawait init(otherBytes); // throws { code: \"already-initialized\", … }\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §3\n",
|
|
128
152
|
"extract-module-not-loaded": "# `extract-module-not-loaded`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\n`page.text()` of `@laminapdf/sdk` was called on a page of a document opened in the base module, which has no text extraction.\n\n## Why\n\n`@laminapdf/sdk` ships three WebAssembly modules: base (open, read, edit, save), extract (base plus text extraction) and text (base plus fonts, shaping and extraction). A document lives in the module it was opened in, and opening uses the richest one loaded at that moment: text, then extract, then base. A document opened before the extract or text module was loaded stays in the base module.\n\n## How to fix\n\nLoad the extract module (about half the size of the text module) before opening the document: `await init({ extract: true })` or `await loadExtract()`. A document already open in the base module can be moved by saving it and opening the bytes again.\n\n## Example\n\n```js\nawait init();\nconst doc = Document.open(bytes);\ndoc.page(0).text(); // throws { code: \"extract-module-not-loaded\", … }\n\nawait loadExtract();\nDocument.open(bytes).page(0).text().text(); // works\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §4\n",
|
|
129
|
-
"fetch-failed": "# `fetch-failed`\n\n- Type: error\n- Kind: `io` (the host failed to supply bytes; often transient)\n\n## What happened\n\nA range source of `@laminapdf/sdk` (`httpRangeSource`) couldn't get bytes it asked for
|
|
153
|
+
"fetch-failed": "# `fetch-failed`\n\n- Type: error\n- Kind: `io` (the host failed to supply bytes; often transient)\n\n## What happened\n\nA range source of `@laminapdf/sdk` (`httpRangeSource`) couldn't get bytes it asked for. The request failed (a network error, a CORS refusal, DNS), or the server answered with a status other than `200` or `206`, or with a `206` whose `Content-Range` (or length) doesn't match the range asked for. A `Content-Range` that the browser hides, because CORS doesn't expose it, looks the same. It is also raised when a `callbackSource`'s read returns a different number of bytes than it was asked for.\n\n## Why\n\nOpening a remote file range by range depends on the server: it must allow the `Range` request and must not compress the response (`Content-Encoding` breaks byte ranges). Across origins, it must also allow the `If-Range` header that every request after the first carries, and expose `Content-Range`, `Content-Length` and `ETag` through CORS. Lamina PDF never retries on its own; the error says the bytes are not available.\n\n## How to fix\n\nCheck that the URL is reachable from where the code runs and that the server sends `Access-Control-Allow-Origin`, `Access-Control-Allow-Headers: Range, If-Range` and `Access-Control-Expose-Headers: Content-Range, Content-Length, ETag`. Serve PDFs without `Content-Encoding`. Retry the call yourself if the failure was transient.\n\n## Example\n\n```js\nconst doc = await Document.openRange(httpRangeSource(url)); // throws { code: \"fetch-failed\", data: { status: 403 } }\n```\n\n## Data fields\n\n- `reason`: `network`, `status`, `content-range` or `length` (Lamina PDF's own words). The URL is never included.\n- `status`: the HTTP status, when there was a response.\n- `expected`, `got`: for `length`, the bytes asked for and the bytes returned.\n",
|
|
130
154
|
"not-initialized": "# `not-initialized`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA function or class of `@laminapdf/sdk` (`Document.open`, `new Builder`, …) was called before `init()` had finished loading and instantiating the WebAssembly module.\n\n## Why\n\n`@laminapdf/sdk` is synchronous after `init()`, but fetching and compiling the `.wasm` file is asynchronous, so it happens once, up front, in `init()`. Until that promise resolves there is no module to call.\n\n## How to fix\n\nAwait `init()` once, before the first call; calling it again is cheap (it is idempotent). In a Cloudflare Worker, pass the imported module: `await init({ module: wasm })`.\n\n## Example\n\n```js\nimport { Document, init } from \"@laminapdf/sdk\";\nDocument.open(bytes); // throws { code: \"not-initialized\", … }\nawait init();\nDocument.open(bytes); // works\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §3\n",
|
|
131
155
|
"source-changed": "# `source-changed`\n\n- Type: error\n- Kind: `io` (the host failed to supply bytes; often transient)\n\n## What happened\n\nA remote file changed while `@laminapdf/sdk` was reading it range by range: a response's `ETag` or total length differs from the first one (or the server ignored `If-Range` and sent a different file).\n\n## Why\n\nA range document is assembled from many responses. If the file changed between them, the parts no longer belong to one file, and the document would read a mix of two versions. `httpRangeSource` sends `If-Range` with the first `ETag` and compares each response's `ETag` and `Content-Range` length with the first.\n\n## How to fix\n\nOpen the file again (a new source, a new document). If the file changes often, download it whole with `Document.open(bytes)` instead.\n\n## Example\n\n```js\nconst doc = await Document.openRange(httpRangeSource(url));\nawait doc.ensure(() => doc.pages); // throws { code: \"source-changed\", … } if the file was replaced meanwhile\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2c](../todos/done/L2c-range-byte-source.md): the range byte source\n",
|
|
132
156
|
"text-module-not-loaded": "# `text-module-not-loaded`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA font or text method (`Font` use, `surface.text`, `surface.textBox`, `builder.font`) was called on a `Builder` created while only the base WebAssembly module was loaded, or `new Builder({ text: true })` was called before the text module was loaded.\n\n## Why\n\n`@laminapdf/sdk` ships two modules: the base module (open, edit, save, vector and image pages) and the larger text module (all of the base plus fonts, shaping and text layout). A document that draws text is built entirely in the text module, and loading it is asynchronous, so it can't happen inside a synchronous drawing call. A builder created without the text module can't gain it later.\n\n## How to fix\n\nLoad the text module before creating the builder that draws text: `await init({ text: true })`, or `await loadText()` after `init()`. Builders created after that use the text module.\n\n## Example\n\n```js\nawait init();\nconst b = new Builder();\nb.page(\"A4\").surface().text(\"Hi\", { font: Font.standard(\"Helvetica\"), size: 12, at: [72, 72] });\n// throws { code: \"text-module-not-loaded\", … }\nawait loadText(); // then create a new Builder\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0016](../decisions/0016-package-design.md) §4\n",
|
|
133
|
-
"disposed": "# `disposed`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA `Document`, `Builder` or other handle of `@laminapdf/sdk` was used after `free()` released it, or after the `using` block that held it ended (`Symbol.dispose`).\n\n## Why\n\nEach handle owns memory inside the WebAssembly module. Freeing it returns that memory at once, so the handle has nothing left to work on.\n\n## How to fix\n\nFree a handle only after its last use. To keep working with the document, open it again from its bytes, or create a new builder.\n\n## Example\n\n```ts\nconst doc = Document.open(bytes);\ndoc.free();\ndoc.save(); // throws LaminaPdfError { code: \"disposed\", … }\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2b](../todos/ready/L2b-disposal-and-memory.md): adds the check that raises this code\n",
|
|
134
157
|
"worker-version-mismatch": "# `worker-version-mismatch`\n\n- Type: error\n- Kind: `usage` (the caller did something the API doesn't allow)\n\n## What happened\n\n`connect()` from `@laminapdf/sdk/worker` started a Web Worker, and its handshake named a different protocol or package version than the client. The client rejected `connect()` and sent nothing else.\n\n## Why\n\nThe client and the Web Worker exchange messages whose shape belongs to one build. A Web Worker from another version (an older deploy, a CDN copy, a separately bundled copy) could misread them, so the handshake fails loudly instead. PDF.js learned the same lesson.\n\n## How to fix\n\nLet the bundler serve the Web Worker from the same `@laminapdf/sdk` package as the page: `connect()` contains the literal `new Worker(new URL(…, import.meta.url))` that Vite and webpack follow. If you pass `{ worker }` yourself, build it from the same package version.\n\n## Example\n\n```ts\nconst client = await connect({ worker: new Worker(\"/old/lamina-worker.js\", { type: \"module\" }) });\n// rejects: LaminaPdfError { code: \"worker-version-mismatch\", … }\n```\n\n## Data fields\n\n- `expected`: the client's `{ protocol, version }`.\n- `actual`: what the Web Worker answered.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2a](../todos/done/L2a-worker-client.md): the worker client\n",
|
|
135
158
|
"worker-crashed": "# `worker-crashed`\n\n- Type: error\n- Kind: `internal` (a bug or an environment failure, not the caller's input)\n\n## What happened\n\nThe Web Worker running `@laminapdf/sdk` (from `@laminapdf/sdk/worker`) stopped: an uncaught error, a WebAssembly trap or the browser killing it (out of memory). Every call still in flight was rejected with this code, and the client emitted a `crashed` event.\n\n## Why\n\nA long synchronous call can keep the Web Worker busy without answering, so Lamina PDF has no heartbeat and never treats silence as a crash. Only the Web Worker's `error` or `messageerror` event, or a trap it reports, counts as a crash.\n\n## How to fix\n\nCall `client.restart()`, then open the document again: handles from the old Web Worker are gone. An encrypted document needs its password again. If one file keeps crashing the Web Worker, report it.\n\n## Example\n\n```ts\nclient.on(\"crashed\", () => client.restart());\nawait doc.save(); // rejects with LaminaPdfError { code: \"worker-crashed\", … } if the Web Worker died\n```\n\n## Data fields\n\n- `reason`: what ended the Web Worker: `error`, `messageerror` or `trap` (a crash, which emits `crashed`), or `terminated` (`client.terminate()`, `restart()`, or a call made when no Web Worker runs).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2a](../todos/done/L2a-worker-client.md): the worker client\n- [ADR 0009](../decisions/0009-web-client-architecture.md) §3.6\n",
|
|
136
159
|
"worker-failed": "# `worker-failed`\n\n- Type: error\n- Kind: `internal` (a bug or an environment failure, not the caller's input)\n\n## What happened\n\nA call through `@laminapdf/sdk/worker` failed inside the Web Worker with an error that isn't a `LaminaPdfError`. The call was rejected with this code and the error's message; the Web Worker and its documents keep working.\n\n## Why\n\nThe Web Worker passes Lamina PDF's own errors through unchanged and rejects caller mistakes it can detect (an unknown method, a parameter it can't receive) with `invalid-argument`. Anything else is a failure of Lamina PDF's client code, such as a result it couldn't send back or a bug in its code.\n\n## How to fix\n\nReport it, with the call you made and the message. The same call through the sync API on the main thread is a workaround while it is fixed.\n\n## Example\n\n```ts\nawait doc.pageCount(); // rejects with LaminaPdfError { code: \"worker-failed\", kind: \"internal\", … } on a bug in Lamina PDF's client\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2a](../todos/done/L2a-worker-client.md): the worker client\n",
|
|
160
|
+
"wasm-trap": "# `wasm-trap`\n\n- Type: error\n- Kind: `internal` (a bug in Lamina PDF or a broken invariant)\n\n## What happened\n\nThe WebAssembly module trapped during the call: Lamina PDF hit a bug and stopped. `@laminapdf/sdk` discarded the module's instance, so the next call runs in a fresh one. Every document, page and builder from the old instance now throws `instance-reset`.\n\n## Why\n\nA trap stops the module in the middle of its work, so its memory may hold half-written state. Nothing in that instance can be trusted afterwards. A fresh instance keeps one failed call from breaking every call after it.\n\n## How to fix\n\nOpen the document again from its bytes and retry. If the same call on the same file traps again, report it with the file: a trap is always a bug in Lamina PDF.\n\n## Example\n\n```ts\ntry {\n lines = doc.page(0).text().lines;\n} catch (e) {\n if (!isLaminaPdfError(e, \"wasm-trap\")) throw e;\n doc = Document.open(bytes); // the old document throws instance-reset from now on\n}\n```\n\n## Data fields\n\n- `module`: the module that trapped: `base`, `text` or `extract`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2b](../todos/done/L2b-disposal-and-memory.md): trap recovery and the fresh instance\n- [ADR 0016](../decisions/0016-package-design.md): the modules and their build\n",
|
|
161
|
+
"out-of-memory": "# `out-of-memory`\n\n- Type: error\n- Kind: `limit` (a `Limits` value or another resource bound was hit)\n\n## What happened\n\nThe WebAssembly module needed more memory than it could get, so it stopped in the middle of the call. Each module may grow to at most 2 GiB, and a browser tab or server can run out before that. `@laminapdf/sdk` discarded the module's instance, so the next call runs in a fresh one. Every document, page and builder from the old instance now throws `instance-reset`.\n\n## Why\n\nA module's memory grows as the module needs more and never shrinks. Many open documents, a huge image, or a file built to exhaust memory can each push it to its limit. The open limits stop most hostile files before memory runs out, and the maximum catches the rest.\n\n## How to fix\n\nOpen the document again, then keep less in memory at once. Free each document and builder as soon as you're done with it, or use `using`. For files from people you don't trust, lower the open limits, such as `maxStreamDecoded` and `maxImagePixels`, so they fail with `limit-exceeded` first. An app can also open each document in its own Web Worker, with `@laminapdf/sdk/worker`, and end the Web Worker afterwards: that returns all of its memory.\n\n## Example\n\n```ts\ntry {\n doc = Document.open(bytes, { limits: { maxStreamDecoded: 64_000_000 } });\n} catch (e) {\n if (isLaminaPdfError(e, \"out-of-memory\")) showError(\"This file is too large to open here.\");\n else throw e;\n}\n```\n\n## Data fields\n\n- `module`: the module that ran out: `base`, `text` or `extract`.\n- `memoryBytes`: the size of its memory when it stopped.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2b](../todos/done/L2b-disposal-and-memory.md): the memory maximum and the fresh instance\n- [ADR 0016](../decisions/0016-package-design.md): the maximum, set when the modules are built\n- [ADR 0003](../decisions/0003-reader-tolerance-and-limits.md) §3: the limits that come first\n",
|
|
162
|
+
"instance-reset": "# `instance-reset`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nA document, page, builder or save job was used after its WebAssembly instance was replaced. `reset()` replaces every loaded module's instance, and a trap (`wasm-trap` or `out-of-memory`) replaces the instance that trapped. The handle belonged to the old instance, so it has nothing left to work on.\n\n## Why\n\nEach handle lives in one instance's memory, and a fresh instance starts empty. Lamina PDF can't move a document across, so every handle from the old instance stops working at once.\n\n## How to fix\n\nOpen the document again from its bytes, or create a new builder. Unsaved edits are lost with the old instance, so save often in an app that calls `reset()` or may run out of memory.\n\n## Example\n\n```ts\nconst doc = Document.open(bytes);\nreset();\ndoc.pageCount; // throws LaminaPdfError { code: \"instance-reset\", … }\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [L2b](../todos/done/L2b-disposal-and-memory.md): `reset()` and trap recovery\n",
|
|
163
|
+
"invalid-command-line": "# `invalid-command-line`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nThe command line didn't parse: a command or flag `laminapdf` doesn't have, a missing argument, a value of the wrong form, or `-` (standard input) named as more than one input.\n\n## Why\n\nThe CLI checks its whole command line before it reads any file, so a typo never runs half a command. Exit code 2 tells a script that the call itself was wrong, not the document.\n\n## How to fix\n\nRun the command with `--help` to see its arguments, and `laminapdf --help` for the commands. Read standard input at most once per command.\n\n## Example\n\n```console\n$ laminapdf info --pages 1 report.pdf\nerror[invalid-command-line]: unexpected argument '--pages' found\n\nUsage: laminapdf info [OPTIONS] <INPUT>\n\nFor more information, try '--help'.\n$ echo $?\n2\n```\n\nWith `--json`, the line on standard error has the message \"the command line doesn't parse\" and the parser's finding in `data.detail`.\n\n## Data fields\n\nWhich field is there depends on what was wrong:\n\n- `detail`: when the parser refused the line, the kind of problem it found, such as `UnknownArgument` or `MissingRequiredArgument`.\n- `argument`: when a value parsed but means nothing, the value given: the angle of `pages rotate`, a `help` topic or a `--fields` key (untrusted: caller text, never in the message).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
164
|
+
"invalid-page-range": "# `invalid-page-range`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA page range doesn't fit the grammar, or it names a page the document doesn't have, such as page 9 of a 5-page file.\n\n## Why\n\nRanges count pages from 1, as people do. A range that can't be read, or that reaches past the last page, fails before anything is written, so a command never works on the wrong pages.\n\n## How to fix\n\nWrite pages as `1-5`, `z` for the last page, `r2` for the second from the end, `x3` to leave page 3 out, and `:odd` or `:even` at the end for every other page of the result. `data.position` is the character where the range went wrong.\n\n## Example\n\n```console\n$ laminapdf pages rotate scan.pdf +90:1-9 -o out.pdf\nerror[invalid-page-range]: the document has 5 pages\n = hint: write pages as 1-5, z for the last page, …\n$ echo $?\n2\n```\n\n## Data fields\n\n- `range`: the range given (untrusted: caller text, never in the message).\n- `position`: the 1-based character of `range` where it went wrong.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
165
|
+
"binary-output-to-terminal": "# `binary-output-to-terminal`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\nA command that writes a PDF was told to write it to standard output (`-o -`), and standard output is a terminal.\n\n## Why\n\nA PDF's bytes would fill the terminal with noise and can leave it in a strange state. The CLI writes binary output only to a file or a pipe.\n\n## How to fix\n\nRedirect standard output to a file or a pipe, or write to a file with `-o`.\n\n## Example\n\n```console\n$ laminapdf pages rotate scan.pdf +90 -o -\nerror[binary-output-to-terminal]: standard output is a terminal\n = hint: redirect standard output to a file or a pipe, or write to a file with -o\n$ laminapdf pages rotate scan.pdf +90 -o - > rotated.pdf\n```\n\n## Data fields\n\nNone.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
166
|
+
"unknown-code": "# `unknown-code`\n\n- Type: error\n- Kind: `usage` (the caller misused the API)\n\n## What happened\n\n`laminapdf explain` was given a code that isn't one of Lamina PDF's error or warning codes.\n\n## Why\n\nEvery code Lamina PDF reports is listed once, with its own page. A code that isn't listed has no explanation to print.\n\n## How to fix\n\nCheck the spelling: `didYouMean` lists the known codes closest to the one given. The tables in this folder's README list every code.\n\n## Example\n\n```console\n$ laminapdf explain xref-repaird\nerror[unknown-code]: not a Lamina PDF code\n = did you mean: xref-repaired\n$ echo $?\n2\n```\n\n## Data fields\n\n- `code`: the code given (untrusted: caller text, never in the message).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
167
|
+
"overwrite-refused": "# `overwrite-refused`\n\n- Type: error\n- Kind: `state` (the call isn't valid in the object's current state)\n\n## What happened\n\nThe output file already exists, or the command was asked to change its input in place with `--in-place`, and `--force` wasn't given.\n\n## Why\n\nThe CLI never replaces a file without being told to, so a mistyped `-o` can't destroy a document. It never prompts either, because scripts and agents can't answer a prompt. Exit code 4 tells a script the command needs `--force`.\n\n## How to fix\n\nPass `--force` to replace the file, or write to a new file with `-o`. The CLI writes to a temporary file and renames it, so a replaced file is never left half written.\n\n## Example\n\n```console\n$ laminapdf pages rotate scan.pdf 90:z --in-place\nerror[overwrite-refused]: refusing to replace a file without --force\n = hint: pass --force, or write to a new file with -o\n$ echo $?\n4\n```\n\n## Data fields\n\n- `output`: the file that would have been replaced (untrusted: caller text, never in the message).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
168
|
+
"input-unreadable": "# `input-unreadable`\n\n- Type: error\n- Kind: `io` (the host failed to supply or take bytes)\n\n## What happened\n\nAn input couldn't be read: the PDF named on the command line, standard input, or the file given to `--password-file`.\n\n## Why\n\nThe file may not exist, may be a folder, or may not be readable by the user running the command.\n\n## How to fix\n\nCheck that the file exists and that you can read it. `data.input` names the file, and `data.reason` says what the system reported.\n\n## Example\n\n```console\n$ laminapdf info missing.pdf\nerror[input-unreadable]: couldn't read an input\n = hint: check that the file exists and that you can read it; data.input names it\n$ echo $?\n1\n```\n\n## Data fields\n\n- `input`: the file that couldn't be read, or `-` for standard input (untrusted: caller text, never in the message).\n- `reason`: the system's error kind, such as `NotFound` or `PermissionDenied`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
169
|
+
"output-unwritable": "# `output-unwritable`\n\n- Type: error\n- Kind: `io` (the host failed to supply or take bytes)\n\n## What happened\n\nThe output couldn't be written: its folder is missing or read-only, the disk is full, or standard output was closed before the command finished.\n\n## Why\n\nThe system refused the write, or standard output closed while the command was writing to it. The CLI writes to a temporary file beside the output and renames it into place, so a failed write leaves any old file as it was.\n\n## How to fix\n\nCheck that the output's folder exists, that you can write to it and that the disk has room. When piping, make sure the reading command doesn't exit early.\n\n## Example\n\n```console\n$ laminapdf pages rotate scan.pdf +90 -o /no/such/folder/out.pdf\nerror[output-unwritable]: couldn't write the output\n = hint: check that the output's folder exists, …\n$ echo $?\n1\n```\n\n## Data fields\n\n- `output`: the file that couldn't be written, or `-` for standard output (untrusted: caller text, never in the message).\n- `reason`: the system's error kind, such as `NotFound` or `StorageFull`.\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §4, §5 and §8\n- [L4a](../todos/done/L4a-lamina-cli.md): the `laminapdf` CLI and its first commands\n",
|
|
170
|
+
"path-outside-roots": "# `path-outside-roots`\n\n- Type: error\n- Kind: `security` (encryption, permissions or signatures block the call)\n\n## What happened\n\nA tool of `laminapdf mcp` was given a path the server may not use: one outside every `--root` folder it was started with, one that climbs out with `..`, or a symbolic link inside a root that leads out of it. A missing file outside the roots, and a link that leads nowhere, get this answer too, so a call can't tell whether a file outside the roots exists.\n\n## Why\n\nAn MCP server acts for a model that may have read instructions planted in a document or a web page. So the server touches only the folders named on its command line by the person who started it. It resolves every path, links included, before it checks the path, so a link can't lead it elsewhere.\n\n## How to fix\n\nUse a path inside one of the server's `--root` folders; a relative path is read from the first root. To work on files elsewhere, start the server with another `--root`.\n\n## Example\n\n```json\n{\"schema\":\"laminapdf.error/1\",\"error\":{\"code\":\"path-outside-roots\",\"kind\":\"security\",\"message\":\"the path is outside the server's --root folders\",\"data\":{\"path\":\"../secret.pdf\"},\"exitCode\":1,…}}\n```\n\n## Data fields\n\n- `path`: the path the tool was given (untrusted: caller text, never in the message).\n\n## For contributors\n\nThe decisions and todos behind this code:\n\n- [ADR 0031](../decisions/0031-cli-and-mcp-contract.md) §9\n- [L4c](../todos/done/L4c-mcp-mode.md): `laminapdf mcp` and its path policy\n",
|
|
137
171
|
};
|
|
138
172
|
//# sourceMappingURL=explain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/generated/explain.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,6FAA6F;AAC7F,qFAAqF;AAIrF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,KAAK,GAAwD;IACxE,gBAAgB,EAAE,o8BAAo8B;IACt9B,eAAe,EAAE,u8BAAu8B;IACx9B,iBAAiB,EAAE,8yBAA8yB;IACj0B,yBAAyB,EAAE,0pBAA0pB;IACrrB,kBAAkB,EAAE,6sBAA6sB;IACjuB,wBAAwB,EAAE,myBAAmyB;IAC7zB,qBAAqB,EAAE,ulBAAulB;IAC9mB,iBAAiB,EAAE,iqBAAiqB;IACprB,uBAAuB,EAAE,6nBAA6nB;IACtpB,4BAA4B,EAAE,mmBAAmmB;IACjoB,qBAAqB,EAAE,qxBAAqxB;IAC5yB,gBAAgB,EAAE,gnBAAgnB;IACloB,oBAAoB,EAAE,itBAAitB;IACvuB,aAAa,EAAE,6yBAA6yB;IAC5zB,gBAAgB,EAAE,0kBAA0kB;IAC5lB,wBAAwB,EAAE,oqBAAoqB;IAC9rB,eAAe,EAAE,sgBAAsgB;IACvhB,sBAAsB,EAAE,wkBAAwkB;IAChmB,cAAc,EAAE,kkBAAkkB;IACllB,oBAAoB,EAAE,8oBAA8oB;IACpqB,eAAe,EAAE,yoBAAyoB;IAC1pB,0BAA0B,EAAE,kjCAAkjC;IAC9kC,sBAAsB,EAAE,q1BAAq1B;IAC72B,sBAAsB,EAAE,o7BAAo7B;IAC58B,uBAAuB,EAAE,48BAA48B;IACr+B,2BAA2B,EAAE,6/BAA6/B;IAC1hC,gBAAgB,EAAE,8+BAA8+B;IAChgC,0BAA0B,EAAE,2uCAA2uC;IACvwC,2BAA2B,EAAE,2+BAA2+B;IACxgC,eAAe,EAAE,4zBA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