@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
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ const doc = Document.open(bytes);
|
|
|
10
10
|
console.log(doc.pageCount);
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
The package is ESM only. It
|
|
13
|
+
The package is ESM only. It's on npm as an alpha release: `npm install @laminapdf/sdk@alpha`.
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
@@ -40,8 +40,8 @@ Coordinates are in page space: points from the top-left of the displayed page, w
|
|
|
40
40
|
| Module | gzip | What it can do |
|
|
41
41
|
| --- | ---: | --- |
|
|
42
42
|
| base (`init()`) | ≈ 373 KB | Open (passwords, limits, strict mode), read pages and Info, warnings, edit with ops (transactions, undo/redo), save (auto, incremental, full rewrite; save jobs); build vector and image pages with links, outline, page labels, metadata |
|
|
43
|
-
| extract (`init({ extract: true })` or `loadExtract()`) | ≈
|
|
44
|
-
| text (`init({ text: true })` or `loadText()`) | ≈ 1,
|
|
43
|
+
| extract (`init({ extract: true })` or `loadExtract()`) | ≈ 589 KB | Everything in base, plus text extraction (`page.text()`, `doc.extract()`) |
|
|
44
|
+
| text (`init({ text: true })` or `loadText()`) | ≈ 1,075 KB | Everything in base, plus fonts (`Font.fromBytes`, the standard 14), shaped text runs and text boxes, and text extraction |
|
|
45
45
|
|
|
46
46
|
A page that never draws text never downloads the text module. A `Builder` is built in the text module when it is loaded at the time the builder is created (or with `new Builder({ text: true })`); drawing text on a base-module builder throws `text-module-not-loaded`.
|
|
47
47
|
|
|
@@ -132,6 +132,47 @@ const text = doc.page(0).text({ skipInvisible: true });
|
|
|
132
132
|
console.log(text.text());
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
+
### For an LLM or a search index: `doc.extract()`
|
|
136
|
+
|
|
137
|
+
`doc.extract({ format })` reads the whole document in reading order, tables included, and leaves out text a reader can't see. It needs the extract or text module, like `page.text()`, and returns one of four outputs:
|
|
138
|
+
|
|
139
|
+
- `"markdown"`: a string, with pipe tables and, with `pageMarkers: true`, a `<!-- page N -->` comment before each page.
|
|
140
|
+
- `"text"`: a string of plain text.
|
|
141
|
+
- `"json"`: an `Extraction`, the `laminapdf.extract/1` document: every block with its page and box in points from the top-left corner, the text left out and why, and the file's warnings. With `chunk`, it carries the chunks too.
|
|
142
|
+
- `"chunks"`: `Chunk`s of whole blocks up to `chunk.maxTokens` (512 by default), each with its blocks, pages, boxes and place in the Markdown.
|
|
143
|
+
|
|
144
|
+
The JSON holds what Rust's `extract_json` writes for the same options.
|
|
145
|
+
|
|
146
|
+
Five more options tune the extraction: `pages`, `readingOrder`, `tables` (`"lattice-and-stream"` also finds tables without lines), `drop` and `dehyphenate`. An unknown option throws `unknown-option` with the name you probably meant.
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
await init({ extract: true });
|
|
150
|
+
const doc = Document.open(bytes);
|
|
151
|
+
const chunks = doc.extract({ format: "chunks", chunk: { maxTokens: 400 } });
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`doc.extract()` runs to the end in one call. In a Web Worker (`@laminapdf/sdk/worker`) the main thread stays free, but aborting the call's `signal` only rejects the promise: the Web Worker finishes the extraction first.
|
|
155
|
+
|
|
156
|
+
### With a layout model: `extractWithModels()`
|
|
157
|
+
|
|
158
|
+
The rules read most pages well. A layout model reads the pages they misread, such as magazines and columns set close together, by finding each page's regions: text, headings, lists, tables, pictures and running headers. The extraction then keeps each region's text together, reads the regions in order and names their kinds.
|
|
159
|
+
|
|
160
|
+
`extractWithModels` runs an extraction with your model: name the model in `options.models`, and for each page the extraction calls your function with the page and the resolution to render it at. Your function returns the regions, each with a label, a box `[x, y, width, height]` in top-left points and a score.
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
const json = await extractWithModels(
|
|
164
|
+
doc,
|
|
165
|
+
{ format: "json", models: { layout: heron.info } },
|
|
166
|
+
{ layout: async ({ page, dpi }) => heron.detect(await renderPage(page, dpi)) },
|
|
167
|
+
);
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Here `heron` is [`@laminapdf/layout-heron`](../layout-heron/README.md)'s `HeronLayout`, which runs Docling's Heron layout model with onnxruntime-web, and `renderPage` is your own function that draws the page with `@laminapdf/render-pdfium` or `@laminapdf/render-hayro`.
|
|
171
|
+
|
|
172
|
+
`generator.models` in the JSON names every model that gave a result, and `generator.mode` reads `rules+models`. An OCR engine plugs in the same way (`models.ocr` and an `ocr` function returning words) and reads only the pages with no visible text.
|
|
173
|
+
|
|
174
|
+
To step the extraction yourself, `doc.extractJob(options)` returns a job: each `step(budget)` that needs a result returns its `request`, and `provide(result)` answers it.
|
|
175
|
+
|
|
135
176
|
## Remote and large files
|
|
136
177
|
|
|
137
178
|
`Document.openRange(source, options)` opens a file whose bytes are fetched range by range, so a remote PDF opens without downloading it whole. Only what the open needs is fetched: the end of the file (the xref), the catalog, the page tree. The document stays synchronous; a call that needs bytes not fetched yet throws `data-pending` with `e.ranges`, and `await doc.ensure(() => …)` fetches them and calls again.
|
|
@@ -143,7 +184,7 @@ const bytes = await doc.ensure(() => doc.save({ mode: "fullRewrite" })); // fetc
|
|
|
143
184
|
```
|
|
144
185
|
|
|
145
186
|
- **`httpRangeSource(url, { headers, credentials, signal, blockSize })`:** the first request asks for the last 64 KiB with `Range: bytes=-65536`, which also gives the size. Later requests are aligned to 16 KiB blocks and send `If-Range` with the first strong `ETag` (else `Last-Modified`); a different `ETag`, `Last-Modified` or size fails with `source-changed`. A server without either validator can't be checked: serve one. A server that answers `200` (no range support) is read from that one full download. HTTP errors are `fetch-failed` with `data.status`; the URL never appears in an error.
|
|
146
|
-
- **CORS:** a `Range` header makes a cross-origin request preflighted. The server must answer with `Access-Control-Allow-Headers: Range` and expose `Content-Range`, `Content-Length` and `ETag` (`Access-Control-Expose-Headers`). It must not compress the response: `Content-Encoding` breaks byte ranges.
|
|
187
|
+
- **CORS:** a `Range` header makes a cross-origin request preflighted, and so does the `If-Range` header every request after the first carries. The server must answer with `Access-Control-Allow-Headers: Range, If-Range` and expose `Content-Range`, `Content-Length` and `ETag` (`Access-Control-Expose-Headers`). It must not compress the response: `Content-Encoding` breaks byte ranges.
|
|
147
188
|
- **`callbackSource(size, read)`:** any other random-access input (a `Blob`'s `slice`, a file handle, an IPC call).
|
|
148
189
|
- **Options:** `signal` (for the open; aborting rejects and cancels its requests in flight; `ensure(f, { signal })` takes its own), `blockSize`, `readahead`, `budget` (the most bytes the document may hold; more is `source-budget-exceeded`) and `maxRounds`.
|
|
149
190
|
- **Off the main thread:** each `ensure` call can take several round trips. `client.openUrl` in a Web Worker hides the loop behind its async API (see below).
|
|
@@ -173,7 +214,7 @@ const updated = await doc.save({ mode: "incremental" }, { signal, onProgress: (p
|
|
|
173
214
|
- `Builder`: its callbacks (`path`, `tag`) can't cross either. Build on the main thread or in your own Web Worker.
|
|
174
215
|
|
|
175
216
|
- **Remote files:** `client.openUrl(url, options)` opens a file by range requests in the Web Worker; every call fetches what it needs first. Its options are `httpRangeSource`'s, without a custom `fetch` (a function can't be sent to the Web Worker), and `openRange`'s (`budget`, `readahead`, `maxRounds`). Aborting the call's `signal` also cancels the fetches in flight.
|
|
176
|
-
- **Cancellation:** pass `signal` to any call. An aborted call rejects at once with `LaminaPdfError` `cancelled`, whose `cause` is the signal's reason, and a late answer is dropped.
|
|
217
|
+
- **Cancellation:** pass `signal` to any call. An aborted call rejects at once with `LaminaPdfError` `cancelled`, whose `cause` is the signal's reason, and a late answer is dropped. If an aborted `open` or `openUrl` opened its document anyway, the Web Worker frees it.
|
|
177
218
|
- **Not started yet:** the call never runs.
|
|
178
219
|
- **`save` / `saveWithReport`:** they run as stepped jobs and stop at the next step. The document stays usable.
|
|
179
220
|
- **Every other call:** one synchronous call in the Web Worker, so it can't be stopped midway (`open` included). `client.terminate()` is the hard stop.
|
|
@@ -196,13 +237,27 @@ const updated = await doc.save({ mode: "incremental" }, { signal, onProgress: (p
|
|
|
196
237
|
|
|
197
238
|
## Memory
|
|
198
239
|
|
|
199
|
-
Documents, builders, pages and images live in WebAssembly memory.
|
|
240
|
+
Documents, builders, pages, save jobs and images live in WebAssembly memory. Free each one when you're done: `using doc = Document.open(…)` frees it at the end of the block, and `doc.free()` frees it at once. A second `free()` does nothing, and any other call afterwards throws `disposed`. A page or save job is freed with its document, a builder's page with its builder, and `page.finish()` and `builder.finish()` free their WebAssembly memory. The garbage collector frees whatever you forget, only later. To find what you forget, `onLeak((leak) => console.warn(leak.handle))` reports each document, builder or image the collector reclaims without a `free()`.
|
|
241
|
+
|
|
242
|
+
WebAssembly memory grows as Lamina PDF needs it and never shrinks. Three bounds keep it in check:
|
|
243
|
+
|
|
244
|
+
- **Limits:** the open limits (`limits` in `Document.open`'s options) stop most hostile files before they use much memory.
|
|
245
|
+
- **A ceiling:** each module may grow to 2 GiB. Past that, the call throws `out-of-memory`.
|
|
246
|
+
- **`reset()`:** replaces every loaded module's instance with a fresh one, so memory returns to its size after `init()`. Every document, page, builder and save job made before throws `instance-reset`, so call it while none is in use, such as between jobs on a server. Images and fonts keep working.
|
|
247
|
+
|
|
248
|
+
When Lamina PDF hits a bug, the module traps and the call throws `wasm-trap`. After a trap or `out-of-memory`, the next call runs in a fresh instance, and the old instance's handles throw `instance-reset`: open the document again from its bytes. In a Web Worker from `@laminapdf/sdk/worker`, a trap ends the Web Worker instead, and `client.restart()` starts a new one. `wasmMemory()` reports each module's memory size.
|
|
249
|
+
|
|
250
|
+
**`using` in Safari:** according to MDN's compatibility data (November 2026), Safari has `Symbol.dispose` only in its Technology Preview. When esbuild or Babel compile `using`, they fall back to `Symbol.for("Symbol.dispose")`, and every Lamina PDF handle answers to that key too. TypeScript's compiled `using` needs the symbol itself, so add `Symbol.dispose ??= Symbol.for("Symbol.dispose")` to your app. In that form it matches Lamina PDF's key whichever runs first. Without it, call `free()` in a `finally` block.
|
|
200
251
|
|
|
201
252
|
## Examples
|
|
202
253
|
|
|
203
|
-
The [
|
|
254
|
+
The [recipes](https://docs.laminapdf.com/recipes/) show each example with what it makes and what to change: `hello`, `invoice`, `multilingual`, `images-and-vectors`, `links-and-outlines` and `generate-then-edit`, plus `report`, 100 pages with two embedded fonts. Each produces the same bytes as its Rust twin.
|
|
255
|
+
|
|
256
|
+
A Cloudflare Worker example generates a PDF per request: `/?name=Ada` returns a letter in Helvetica, and `/embedded?name=Ada` the same letter in a font bundled with the Cloudflare Worker. A name the font can't draw gets a 400 with the error as JSON. The [Cloudflare Workers quick start](https://docs.laminapdf.com/quick-start/workers/) shows it and how to run it.
|
|
257
|
+
|
|
258
|
+
## Docs for coding agents
|
|
204
259
|
|
|
205
|
-
|
|
260
|
+
The package carries these docs as Markdown in `docs/`, for the version you installed: `docs/llms.txt` lists every page, `docs/api/` holds the API reference, `docs/errors/` explains each error code and `docs/renames.json` says what renamed items are called now. Paste `docs/AGENTS.md` into your project's `AGENTS.md` or `CLAUDE.md` to point your coding agent at them. The [coding agents page](https://docs.laminapdf.com/start/coding-agents/) has the details.
|
|
206
261
|
|
|
207
262
|
## Working on this package
|
|
208
263
|
|
package/dist/api.d.ts
CHANGED
|
@@ -3,11 +3,16 @@ export { Builder, PAGE_SIZES, Page, PendingPath, Surface, TAG_NAMES } from "./bu
|
|
|
3
3
|
export { Document, PageRef, SaveJob } from "./document.js";
|
|
4
4
|
export type { Diagnostic, ErrorKind, LaminaPdfWarning, Location } from "./errors.js";
|
|
5
5
|
export { isLaminaPdfError, LaminaPdfError } from "./errors.js";
|
|
6
|
+
export type { Cell, Chunk, ChunkOptions, Coordinates, Dropped, DropReason, ExtractedBlock, ExtractedPage, ExtractedSource, ExtractFormat, Extraction, ExtractOptions, ExtractResult, Flags, Generator, ReadingOrder, Region, Span, SplitOn, StructRef, StructSource, TableDetector, TableMode, TextLayer, TextLayerStatus, TextRange, } from "./extract.js";
|
|
7
|
+
export type { ExtractJobOptions, ExtractStep, HostModels, LayoutRegion, ModelInfo, ModelRequest, ModelResult, Models, OcrWord, RegionLabel, } from "./extract-job.js";
|
|
8
|
+
export { ExtractJob, extractWithModels } from "./extract-job.js";
|
|
6
9
|
export type { FontInfo, Standard14 } from "./font.js";
|
|
7
10
|
export { Font, Image } from "./font.js";
|
|
8
11
|
export type { ErrorCode, LimitName, WarningCode } from "./generated/codes.js";
|
|
9
12
|
export type { InitOptions, WasmMemory, WasmSource } from "./init.js";
|
|
10
|
-
export { isExtractLoaded, isInitialized, isTextLoaded, wasmMemory } from "./init.js";
|
|
13
|
+
export { isExtractLoaded, isInitialized, isTextLoaded, reset, wasmMemory } from "./init.js";
|
|
14
|
+
export type { Leak } from "./internal/handle.js";
|
|
15
|
+
export { onLeak } from "./internal/handle.js";
|
|
11
16
|
export type { Transform } from "./matrix.js";
|
|
12
17
|
export { Matrix } from "./matrix.js";
|
|
13
18
|
export type { PathBuilder } from "./path.js";
|
|
@@ -16,8 +21,8 @@ export { httpRangeSource } from "./source/http.js";
|
|
|
16
21
|
export type { ByteRange, RangeOptions, RangeSource } from "./source/range.js";
|
|
17
22
|
export { callbackSource } from "./source/range.js";
|
|
18
23
|
export type { GlyphQuad, QuadPoint, TextGlyph, TextOptions as PageTextOptions } from "./text.js";
|
|
19
|
-
export { PageText,
|
|
24
|
+
export { PageText, PageTextRun } from "./text.js";
|
|
20
25
|
export type { InfoPatch, Rotation } from "./transaction.js";
|
|
21
26
|
export { Transaction } from "./transaction.js";
|
|
22
|
-
export type { AfRelationship, Align, AttachmentOptions, BoxRect, BuildOptions, Color, Direction, DocumentInfo, Edited, Fit, Limits, LineBox, LinkTarget, Metadata, Op, OpenOptions, OpLog, OutlineEntry, Overflow, PageInfo, PageLabel, Point, Profile, Progress, Rect, RenderMode, SaveOptions, SaveReport, TextLayout, TextRunInfo, UndoOutcome, ViewerPreferences, } from "./types.js";
|
|
27
|
+
export type { AfRelationship, Align, AttachmentOptions, BoxRect, BuildOptions, Color, Direction, DocumentInfo, Edited, Fit, Limits, LineBox, LinkTarget, Metadata, Op, OpenOptions, OpLog, OutlineEntry, OutlineNode, Overflow, PageInfo, PageLabel, Point, Profile, Progress, Rect, RenderMode, SaveOptions, SaveReport, StructureKid, StructureNode, Target, TargetView, TextLayout, TextRunInfo, UndoOutcome, ViewerPreferences, } from "./types.js";
|
|
23
28
|
//# sourceMappingURL=api.d.ts.map
|
package/dist/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,UAAU,EACV,GAAG,EACH,OAAO,EACP,OAAO,EACP,cAAc,EACd,WAAW,GACZ,MAAM,cAAc,CAAC;A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,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,cAAc,EACd,KAAK,EACL,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,KAAK,EACL,SAAS,EACT,YAAY,EACZ,MAAM,EACN,GAAG,EACH,MAAM,EACN,OAAO,EACP,UAAU,EACV,QAAQ,EACR,EAAE,EACF,WAAW,EACX,KAAK,EACL,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,WAAW,EACX,WAAW,EACX,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
package/dist/api.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export { Builder, PAGE_SIZES, Page, PendingPath, Surface, TAG_NAMES } from "./builder.js";
|
|
2
2
|
export { Document, PageRef, SaveJob } from "./document.js";
|
|
3
3
|
export { isLaminaPdfError, LaminaPdfError } from "./errors.js";
|
|
4
|
+
export { ExtractJob, extractWithModels } from "./extract-job.js";
|
|
4
5
|
export { Font, Image } from "./font.js";
|
|
5
|
-
export { isExtractLoaded, isInitialized, isTextLoaded, wasmMemory } from "./init.js";
|
|
6
|
+
export { isExtractLoaded, isInitialized, isTextLoaded, reset, wasmMemory } from "./init.js";
|
|
7
|
+
export { onLeak } from "./internal/handle.js";
|
|
6
8
|
export { Matrix } from "./matrix.js";
|
|
7
9
|
export { httpRangeSource } from "./source/http.js";
|
|
8
10
|
export { callbackSource } from "./source/range.js";
|
|
9
|
-
export { PageText,
|
|
11
|
+
export { PageText, PageTextRun } from "./text.js";
|
|
10
12
|
export { Transaction } from "./transaction.js";
|
|
11
13
|
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAyC/D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5F,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/builder.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import type { WasmImage } from "@laminapdf/wasm/base";
|
|
1
2
|
import type { WasmPageBuilder as TextPageBuilder, WasmFont } from "@laminapdf/wasm/text";
|
|
2
3
|
import { Document } from "./document.js";
|
|
3
4
|
import type { Font, FontInfo, Image } from "./font.js";
|
|
4
5
|
import { type ArtifactKind, type BlendMode, type FillRule, type LineCap, type LineJoin, type TableScope, type TagName } from "./generated/builder-enums.js";
|
|
5
|
-
import { type BaseGlue
|
|
6
|
+
import { type BaseGlue } from "./init.js";
|
|
7
|
+
import { Handle } from "./internal/handle.js";
|
|
8
|
+
import type { Instance } from "./internal/instance.js";
|
|
6
9
|
import type { Transform } from "./matrix.js";
|
|
7
10
|
import { type PathBuilder } from "./path.js";
|
|
8
11
|
import type { Align, AttachmentOptions, BuildOptions, Color, Direction, Fit, LinkTarget, Metadata, OutlineEntry, Overflow, PageLabel, Point, Rect, RenderMode, TextLayout, TextRunInfo, ViewerPreferences } from "./types.js";
|
|
@@ -105,12 +108,22 @@ export interface TextBoxOptions {
|
|
|
105
108
|
/** The structure element the box is (as drawing it inside {@link Surface.tag}). */
|
|
106
109
|
readonly tag?: Tag;
|
|
107
110
|
}
|
|
108
|
-
/**
|
|
109
|
-
|
|
111
|
+
/**
|
|
112
|
+
* The raw page of a {@link Page}, a handle freed with its builder: `builder-finished` once the page
|
|
113
|
+
* or its builder finishes, `disposed` once either is freed.
|
|
114
|
+
*/
|
|
115
|
+
declare class LivePage extends Handle<BaseGlue> {
|
|
110
116
|
#private;
|
|
111
|
-
constructor(raw: TextPageBuilder,
|
|
112
|
-
|
|
113
|
-
|
|
117
|
+
constructor(raw: TextPageBuilder, builder: Builder, instance: Instance<BaseGlue>, onClose: (page: LivePage) => void);
|
|
118
|
+
/**
|
|
119
|
+
* Runs `f`, calls into the glue, on this page's raw side.
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link LaminaPdfError} `disposed`, `instance-reset`, `builder-finished`; what `f` throws.
|
|
122
|
+
*/
|
|
123
|
+
run<T>(f: (page: TextPageBuilder) => T): T;
|
|
124
|
+
/** Frees the raw page and keeps the handle: later calls throw `builder-finished`. */
|
|
125
|
+
close(): void;
|
|
126
|
+
protected release(): void;
|
|
114
127
|
}
|
|
115
128
|
/** A path waiting to be painted: fill it, stroke it, both, or clip to it. */
|
|
116
129
|
export declare class PendingPath {
|
|
@@ -182,7 +195,9 @@ export declare class Surface {
|
|
|
182
195
|
tag(tag: Tag, draw: (s: this) => void): this;
|
|
183
196
|
/**
|
|
184
197
|
* Draws what `draw` draws as an artifact: decoration, running heads and footers, backgrounds;
|
|
185
|
-
* content outside the structure tree.
|
|
198
|
+
* content outside the structure tree. `"header"`, `"footer"` and `"watermark"` are pagination
|
|
199
|
+
* artifacts that also say which (`/Subtype`), a header attached to the page's top edge and a
|
|
200
|
+
* footer to its bottom (`/Attached`).
|
|
186
201
|
*/
|
|
187
202
|
artifact(kind: ArtifactKind, draw: (s: this) => void): this;
|
|
188
203
|
/** A link annotation over `rect`, with `contents` as its alternate text. */
|
|
@@ -190,19 +205,25 @@ export declare class Surface {
|
|
|
190
205
|
/**
|
|
191
206
|
* Draws `text`: shaped, bidi-resolved, one line per line break (needs the text module).
|
|
192
207
|
*
|
|
193
|
-
* @returns what the run measures
|
|
208
|
+
* @returns what the run measures, with `bottom`: where the next element can start (the next text box's top), the
|
|
209
|
+
* descent below the last line that draws something, before the surface's transform; left out when nothing is.
|
|
194
210
|
* @throws {@link LaminaPdfError} `text-module-not-loaded`, `missing-glyph`, `font-not-shapable`, …
|
|
195
211
|
*/
|
|
196
212
|
text(text: string, options: TextOptions): TextRunInfo;
|
|
197
213
|
/**
|
|
198
214
|
* Lays `text` out in `options.box`, breaking lines at Unicode line-break opportunities.
|
|
199
215
|
*
|
|
200
|
-
* @returns the lines drawn
|
|
216
|
+
* @returns the lines drawn, where the overflow starts (UTF-16 offsets; test it with `!== undefined`, as `0` means no
|
|
217
|
+
* line fitted) and `bottom`: the last line that draws something, before the surface's transform; left out when none
|
|
218
|
+
* does.
|
|
201
219
|
* @throws {@link LaminaPdfError} as {@link Surface.text}; `text-overflow` with `overflow: "error"`.
|
|
202
220
|
*/
|
|
203
221
|
textBox(text: string, options: TextBoxOptions): TextLayout;
|
|
204
222
|
}
|
|
205
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* A page being drawn: its boxes and rotation, its {@link Surface}, then {@link Page.finish}. Freed
|
|
225
|
+
* with its builder; `using` or {@link Page.free} drops it without writing it.
|
|
226
|
+
*/
|
|
206
227
|
export declare class Page {
|
|
207
228
|
#private;
|
|
208
229
|
/** @internal */
|
|
@@ -229,13 +250,19 @@ export declare class Page {
|
|
|
229
250
|
* @throws {@link LaminaPdfError} `invalid-geometry`, `builder-finished`.
|
|
230
251
|
*/
|
|
231
252
|
finish(): string;
|
|
232
|
-
/**
|
|
253
|
+
/**
|
|
254
|
+
* Drops the page without writing it and frees its WASM side; a second call does nothing, and
|
|
255
|
+
* any other call afterwards throws `disposed`.
|
|
256
|
+
*/
|
|
233
257
|
free(): void;
|
|
258
|
+
/** Drops the page at the end of a `using` block (an alias of `free()`). */
|
|
259
|
+
[Symbol.dispose](): void;
|
|
234
260
|
}
|
|
235
261
|
/**
|
|
236
262
|
* Builds a new document: pages, navigation and metadata; {@link Builder.finish} returns a
|
|
237
263
|
* {@link Document} to save. Created in the text module when it is loaded (or `text: true`),
|
|
238
|
-
* else in the reading module (text, extract, then base; vector and image pages only).
|
|
264
|
+
* else in the reading module (text, extract, then base; vector and image pages only). `finish()`
|
|
265
|
+
* frees its WebAssembly memory; to drop it unfinished, use `using` or {@link Builder.free}.
|
|
239
266
|
*
|
|
240
267
|
* @example
|
|
241
268
|
* ```ts
|
|
@@ -247,16 +274,16 @@ export declare class Page {
|
|
|
247
274
|
* const bytes = b.finish().save();
|
|
248
275
|
* ```
|
|
249
276
|
*/
|
|
250
|
-
export declare class Builder {
|
|
277
|
+
export declare class Builder extends Handle<BaseGlue> {
|
|
251
278
|
#private;
|
|
252
|
-
/** @internal The module the document is built in. */
|
|
253
|
-
readonly glue: BaseGlue | TextGlue;
|
|
254
279
|
/**
|
|
255
280
|
* @param options - version, file ID, producer, creation date, compression, tagging,
|
|
256
281
|
* conformance `profiles`; `text`.
|
|
257
282
|
* @throws {@link LaminaPdfError} `not-initialized`, `text-module-not-loaded`; `unknown-option`.
|
|
258
283
|
*/
|
|
259
284
|
constructor(options?: BuilderOptions);
|
|
285
|
+
/** @internal `image` in this builder's instance. */
|
|
286
|
+
wasmImage(image: Image): WasmImage;
|
|
260
287
|
/** As `new Builder(options)`. */
|
|
261
288
|
static create(options?: BuilderOptions): Builder;
|
|
262
289
|
/** Whether this builder draws in the text module (fonts and text). */
|
|
@@ -308,12 +335,6 @@ export declare class Builder {
|
|
|
308
335
|
* code (the error reference lists them, from `profile-version-conflict` on).
|
|
309
336
|
*/
|
|
310
337
|
finish(): Document;
|
|
311
|
-
|
|
312
|
-
* Frees the builder's WASM memory now (`finish` does this itself); the builder takes no more
|
|
313
|
-
* calls afterwards. Unfinished pages are freed with {@link Page.free}.
|
|
314
|
-
*/
|
|
315
|
-
free(): void;
|
|
316
|
-
/** Frees the builder at the end of a `using` block. */
|
|
317
|
-
[Symbol.dispose](): void;
|
|
338
|
+
protected release(): void;
|
|
318
339
|
}
|
|
319
340
|
//# sourceMappingURL=builder.d.ts.map
|
package/dist/builder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA8B,eAAe,IAAI,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,QAAQ,EAGb,KAAK,UAAU,EACf,KAAK,OAAO,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA4C,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,KAAK,EAA8B,eAAe,IAAI,eAAe,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,QAAQ,EAGb,KAAK,UAAU,EACf,KAAK,OAAO,EACb,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,KAAK,QAAQ,EAA6B,MAAM,WAAW,CAAC;AACrE,OAAO,EAAsB,MAAM,EAAS,MAAM,sBAAsB,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,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