@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
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "0.2.0-alpha.4"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[**@laminapdf/sdk**](../README.md)
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
[@laminapdf/sdk](../README.md) / WarningCode
|
|
10
|
+
|
|
11
|
+
# Type Alias: WarningCode
|
|
12
|
+
|
|
13
|
+
> **WarningCode** = `"missing-header"` \| `"xref-repaired"` \| `"xrefstm-ignored"` \| `"stream-length-recovered"` \| `"stale-generation"` \| `"page-tree-node-skipped"` \| `"page-count-mismatch"` \| `"flate-truncated"` \| `"objstm-index-mismatch"` \| `"object-number-out-of-range"` \| `"aes-padding-invalid"` \| `"perms-mismatch"` \| `"warnings-truncated"` \| `"invalid-box"` \| `"invalid-rotate"` \| `"name-tree-node-skipped"` \| `"outline-cycle"` \| `"outline-item-skipped"` \| `"invalid-date"` \| `"invalid-page-label"` \| `"invalid-entry"` \| `"content-unknown-operator"` \| `"content-bad-operands"` \| `"content-unbalanced-q"` \| `"content-unbalanced-bt"` \| `"content-unbalanced-marked"` \| `"content-syntax"` \| `"content-resource-missing"` \| `"inline-image-unterminated"` \| `"xobject-cycle"` \| `"content-path-unpainted"` \| `"font-invalid"` \| `"cmap-invalid"` \| `"unmapped-glyph"` \| `"extract-limit-blocks"` \| `"extract-reading-order-ambiguous"` \| `"extract-table-ambiguous"` \| `"extract-table-limit"` \| `"extract-struct-tree-ignored"` \| `"extract-untagged-content"` \| `"extract-needs-ocr"` \| `"extract-column-order-uncertain"` \| `"tounicode-conflict"` \| `"whole-font-rebuilt"` \| `"flow-keep-broken"` \| `"markdown-html-ignored"` \| `"markdown-image-missing"` \| `"covered-text"` \| `"redaction-not-applied"` \| `"text-in-earlier-revision"`
|
|
14
|
+
|
|
15
|
+
Every warning code (ADR 0026 §3; `fixtures/codes.json`).
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "0.2.0-alpha.4"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[**@laminapdf/sdk**](../README.md)
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
[@laminapdf/sdk](../README.md) / WasmSource
|
|
10
|
+
|
|
11
|
+
# Type Alias: WasmSource
|
|
12
|
+
|
|
13
|
+
> **WasmSource** = `URL` \| `string` \| `Response` \| `PromiseLike`\<`Response`\> \| `ArrayBuffer` \| `ArrayBufferView` \| `WebAssembly.Module`
|
|
14
|
+
|
|
15
|
+
Where a module comes from: a URL (or URL string) to fetch, a `Response` (or a promise of one),
|
|
16
|
+
the bytes, or a compiled `WebAssembly.Module` (Cloudflare Workers import one).
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "0.2.0-alpha.4"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[**@laminapdf/sdk**](../README.md)
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
[@laminapdf/sdk](../README.md) / Matrix
|
|
10
|
+
|
|
11
|
+
# Variable: Matrix
|
|
12
|
+
|
|
13
|
+
> `const` **Matrix**: `object`
|
|
14
|
+
|
|
15
|
+
Building transformation matrices.
|
|
16
|
+
|
|
17
|
+
## Type Declaration
|
|
18
|
+
|
|
19
|
+
### identity
|
|
20
|
+
|
|
21
|
+
> `readonly` **identity**: [`Transform`](../type-aliases/Transform.md)
|
|
22
|
+
|
|
23
|
+
The identity.
|
|
24
|
+
|
|
25
|
+
### after()
|
|
26
|
+
|
|
27
|
+
> `readonly` **after**(`outer`, `inner`): [`Transform`](../type-aliases/Transform.md)
|
|
28
|
+
|
|
29
|
+
`outer` applied after `inner`: maps p to outer(inner(p)).
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
##### outer
|
|
34
|
+
|
|
35
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
36
|
+
|
|
37
|
+
##### inner
|
|
38
|
+
|
|
39
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
44
|
+
|
|
45
|
+
### rotate()
|
|
46
|
+
|
|
47
|
+
> `readonly` **rotate**(`degrees`): [`Transform`](../type-aliases/Transform.md)
|
|
48
|
+
|
|
49
|
+
A rotation by `degrees` about the origin, clockwise as displayed.
|
|
50
|
+
|
|
51
|
+
#### Parameters
|
|
52
|
+
|
|
53
|
+
##### degrees
|
|
54
|
+
|
|
55
|
+
`number`
|
|
56
|
+
|
|
57
|
+
#### Returns
|
|
58
|
+
|
|
59
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
60
|
+
|
|
61
|
+
### scale()
|
|
62
|
+
|
|
63
|
+
> `readonly` **scale**(`sx`, `sy`): [`Transform`](../type-aliases/Transform.md)
|
|
64
|
+
|
|
65
|
+
A scaling by `sx` horizontally and `sy` vertically.
|
|
66
|
+
|
|
67
|
+
#### Parameters
|
|
68
|
+
|
|
69
|
+
##### sx
|
|
70
|
+
|
|
71
|
+
`number`
|
|
72
|
+
|
|
73
|
+
##### sy
|
|
74
|
+
|
|
75
|
+
`number`
|
|
76
|
+
|
|
77
|
+
#### Returns
|
|
78
|
+
|
|
79
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
80
|
+
|
|
81
|
+
### translate()
|
|
82
|
+
|
|
83
|
+
> `readonly` **translate**(`x`, `y`): [`Transform`](../type-aliases/Transform.md)
|
|
84
|
+
|
|
85
|
+
A translation by (x, y) points.
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
##### x
|
|
90
|
+
|
|
91
|
+
`number`
|
|
92
|
+
|
|
93
|
+
##### y
|
|
94
|
+
|
|
95
|
+
`number`
|
|
96
|
+
|
|
97
|
+
#### Returns
|
|
98
|
+
|
|
99
|
+
[`Transform`](../type-aliases/Transform.md)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "0.2.0-alpha.4"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[**@laminapdf/sdk**](../README.md)
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
[@laminapdf/sdk](../README.md) / PAGE\_SIZES
|
|
10
|
+
|
|
11
|
+
# Variable: PAGE\_SIZES
|
|
12
|
+
|
|
13
|
+
> `const` **PAGE\_SIZES**: `Readonly`\<`Record`\<[`PageSizeName`](../type-aliases/PageSizeName.md), readonly \[`width`: `number`, `height`: `number`\]\>\>
|
|
14
|
+
|
|
15
|
+
Each named size in points, width × height.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: "0.2.0-alpha.4"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[**@laminapdf/sdk**](../README.md)
|
|
6
|
+
|
|
7
|
+
***
|
|
8
|
+
|
|
9
|
+
[@laminapdf/sdk](../README.md) / TAG\_NAMES
|
|
10
|
+
|
|
11
|
+
# Variable: TAG\_NAMES
|
|
12
|
+
|
|
13
|
+
> `const` **TAG\_NAMES**: readonly \[`"Document"`, `"Part"`, `"Sect"`, `"H1"`, `"H2"`, `"H3"`, `"H4"`, `"H5"`, `"H6"`, `"P"`, `"L"`, `"LI"`, `"Lbl"`, `"LBody"`, `"Table"`, `"TR"`, `"TH"`, `"TD"`, `"Figure"`, `"Caption"`, `"Link"`, `"Span"`, `"Quote"`, `"Note"`, `"Code"`, `"THead"`, `"TBody"`, `"TFoot"`, `"TOC"`, `"TOCI"`, `"Reference"`, `"BlockQuote"`\]
|
|
14
|
+
|
|
15
|
+
Every TagName, as the WASM module names it.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Error and warning codes"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Error and warning codes
|
|
8
|
+
|
|
9
|
+
- [`aes-padding-invalid`](aes-padding-invalid.md)
|
|
10
|
+
- [`already-initialized`](already-initialized.md)
|
|
11
|
+
- [`binary-output-to-terminal`](binary-output-to-terminal.md)
|
|
12
|
+
- [`builder-finished`](builder-finished.md)
|
|
13
|
+
- [`cancelled`](cancelled.md)
|
|
14
|
+
- [`cmap-invalid`](cmap-invalid.md)
|
|
15
|
+
- [`collection-index`](collection-index.md)
|
|
16
|
+
- [`color-components`](color-components.md)
|
|
17
|
+
- [`content-bad-operands`](content-bad-operands.md)
|
|
18
|
+
- [`content-path-unpainted`](content-path-unpainted.md)
|
|
19
|
+
- [`content-resource-missing`](content-resource-missing.md)
|
|
20
|
+
- [`content-syntax`](content-syntax.md)
|
|
21
|
+
- [`content-unbalanced-bt`](content-unbalanced-bt.md)
|
|
22
|
+
- [`content-unbalanced-marked`](content-unbalanced-marked.md)
|
|
23
|
+
- [`content-unbalanced-q`](content-unbalanced-q.md)
|
|
24
|
+
- [`content-unknown-operator`](content-unknown-operator.md)
|
|
25
|
+
- [`covered-text`](covered-text.md)
|
|
26
|
+
- [`data-pending`](data-pending.md)
|
|
27
|
+
- [`decompress`](decompress.md)
|
|
28
|
+
- [`device-color-without-output-intent`](device-color-without-output-intent.md)
|
|
29
|
+
- [`direct-page`](direct-page.md)
|
|
30
|
+
- [`disposed`](disposed.md)
|
|
31
|
+
- [`document-changed`](document-changed.md)
|
|
32
|
+
- [`embedded-file-forbidden`](embedded-file-forbidden.md)
|
|
33
|
+
- [`embedded-file-without-mime-type`](embedded-file-without-mime-type.md)
|
|
34
|
+
- [`encoding-full`](encoding-full.md)
|
|
35
|
+
- [`encrypted-base`](encrypted-base.md)
|
|
36
|
+
- [`extract-column-order-uncertain`](extract-column-order-uncertain.md)
|
|
37
|
+
- [`extract-limit-blocks`](extract-limit-blocks.md)
|
|
38
|
+
- [`extract-module-not-loaded`](extract-module-not-loaded.md)
|
|
39
|
+
- [`extract-needs-ocr`](extract-needs-ocr.md)
|
|
40
|
+
- [`extract-reading-order-ambiguous`](extract-reading-order-ambiguous.md)
|
|
41
|
+
- [`extract-struct-tree-ignored`](extract-struct-tree-ignored.md)
|
|
42
|
+
- [`extract-table-ambiguous`](extract-table-ambiguous.md)
|
|
43
|
+
- [`extract-table-limit`](extract-table-limit.md)
|
|
44
|
+
- [`extract-untagged-content`](extract-untagged-content.md)
|
|
45
|
+
- [`fetch-failed`](fetch-failed.md)
|
|
46
|
+
- [`flate-truncated`](flate-truncated.md)
|
|
47
|
+
- [`flow-content-too-large`](flow-content-too-large.md)
|
|
48
|
+
- [`flow-keep-broken`](flow-keep-broken.md)
|
|
49
|
+
- [`flow-layout-unstable`](flow-layout-unstable.md)
|
|
50
|
+
- [`font-invalid`](font-invalid.md)
|
|
51
|
+
- [`font-mismatch`](font-mismatch.md)
|
|
52
|
+
- [`font-not-embeddable`](font-not-embeddable.md)
|
|
53
|
+
- [`font-not-embedded`](font-not-embedded.md)
|
|
54
|
+
- [`font-not-shapable`](font-not-shapable.md)
|
|
55
|
+
- [`glyph-out-of-range`](glyph-out-of-range.md)
|
|
56
|
+
- [`glyph-without-unicode`](glyph-without-unicode.md)
|
|
57
|
+
- [`heading-level-skipped`](heading-level-skipped.md)
|
|
58
|
+
- [`image-data-length`](image-data-length.md)
|
|
59
|
+
- [`image-too-large`](image-too-large.md)
|
|
60
|
+
- [`inline-image-unterminated`](inline-image-unterminated.md)
|
|
61
|
+
- [`input-unreadable`](input-unreadable.md)
|
|
62
|
+
- [`instance-reset`](instance-reset.md)
|
|
63
|
+
- [`invalid-argument`](invalid-argument.md)
|
|
64
|
+
- [`invalid-axis-value`](invalid-axis-value.md)
|
|
65
|
+
- [`invalid-box`](invalid-box.md)
|
|
66
|
+
- [`invalid-color`](invalid-color.md)
|
|
67
|
+
- [`invalid-command-line`](invalid-command-line.md)
|
|
68
|
+
- [`invalid-date`](invalid-date.md)
|
|
69
|
+
- [`invalid-entry`](invalid-entry.md)
|
|
70
|
+
- [`invalid-feature`](invalid-feature.md)
|
|
71
|
+
- [`invalid-font`](invalid-font.md)
|
|
72
|
+
- [`invalid-geometry`](invalid-geometry.md)
|
|
73
|
+
- [`invalid-icc-profile`](invalid-icc-profile.md)
|
|
74
|
+
- [`invalid-image`](invalid-image.md)
|
|
75
|
+
- [`invalid-op-log`](invalid-op-log.md)
|
|
76
|
+
- [`invalid-page-label`](invalid-page-label.md)
|
|
77
|
+
- [`invalid-page-labels`](invalid-page-labels.md)
|
|
78
|
+
- [`invalid-page-range`](invalid-page-range.md)
|
|
79
|
+
- [`invalid-rotate`](invalid-rotate.md)
|
|
80
|
+
- [`invalid-spans`](invalid-spans.md)
|
|
81
|
+
- [`invalid-structure-nesting`](invalid-structure-nesting.md)
|
|
82
|
+
- [`invalid-structure`](invalid-structure.md)
|
|
83
|
+
- [`invalid-text-range`](invalid-text-range.md)
|
|
84
|
+
- [`job-finished`](job-finished.md)
|
|
85
|
+
- [`limit-exceeded`](limit-exceeded.md)
|
|
86
|
+
- [`link-without-contents`](link-without-contents.md)
|
|
87
|
+
- [`link-without-structure`](link-without-structure.md)
|
|
88
|
+
- [`markdown-html-ignored`](markdown-html-ignored.md)
|
|
89
|
+
- [`markdown-image-missing`](markdown-image-missing.md)
|
|
90
|
+
- [`missing-alt-text`](missing-alt-text.md)
|
|
91
|
+
- [`missing-glyph`](missing-glyph.md)
|
|
92
|
+
- [`missing-header`](missing-header.md)
|
|
93
|
+
- [`missing-lang`](missing-lang.md)
|
|
94
|
+
- [`missing-root`](missing-root.md)
|
|
95
|
+
- [`missing-title`](missing-title.md)
|
|
96
|
+
- [`model-failed`](model-failed.md)
|
|
97
|
+
- [`model-needs-host`](model-needs-host.md)
|
|
98
|
+
- [`model-result-unexpected`](model-result-unexpected.md)
|
|
99
|
+
- [`name-tree-node-skipped`](name-tree-node-skipped.md)
|
|
100
|
+
- [`nested-transaction`](nested-transaction.md)
|
|
101
|
+
- [`no-pending-save`](no-pending-save.md)
|
|
102
|
+
- [`no-transaction`](no-transaction.md)
|
|
103
|
+
- [`not-initialized`](not-initialized.md)
|
|
104
|
+
- [`not-pdf`](not-pdf.md)
|
|
105
|
+
- [`not-rebased`](not-rebased.md)
|
|
106
|
+
- [`object-number-out-of-range`](object-number-out-of-range.md)
|
|
107
|
+
- [`objstm-index-mismatch`](objstm-index-mismatch.md)
|
|
108
|
+
- [`out-of-memory`](out-of-memory.md)
|
|
109
|
+
- [`outline-cycle`](outline-cycle.md)
|
|
110
|
+
- [`outline-item-skipped`](outline-item-skipped.md)
|
|
111
|
+
- [`output-unwritable`](output-unwritable.md)
|
|
112
|
+
- [`overwrite-refused`](overwrite-refused.md)
|
|
113
|
+
- [`page-count-mismatch`](page-count-mismatch.md)
|
|
114
|
+
- [`page-index-out-of-range`](page-index-out-of-range.md)
|
|
115
|
+
- [`page-tree-node-skipped`](page-tree-node-skipped.md)
|
|
116
|
+
- [`password-required`](password-required.md)
|
|
117
|
+
- [`path-outside-roots`](path-outside-roots.md)
|
|
118
|
+
- [`perms-mismatch`](perms-mismatch.md)
|
|
119
|
+
- [`profile-version-conflict`](profile-version-conflict.md)
|
|
120
|
+
- [`redaction-not-applied`](redaction-not-applied.md)
|
|
121
|
+
- [`reference-cycle`](reference-cycle.md)
|
|
122
|
+
- [`render-backend-unavailable`](render-backend-unavailable.md)
|
|
123
|
+
- [`render-failed`](render-failed.md)
|
|
124
|
+
- [`render-too-large`](render-too-large.md)
|
|
125
|
+
- [`repaired-base`](repaired-base.md)
|
|
126
|
+
- [`requires-rewrite`](requires-rewrite.md)
|
|
127
|
+
- [`revision-index-out-of-range`](revision-index-out-of-range.md)
|
|
128
|
+
- [`saved-not-rebased`](saved-not-rebased.md)
|
|
129
|
+
- [`sink-not-empty`](sink-not-empty.md)
|
|
130
|
+
- [`sink`](sink.md)
|
|
131
|
+
- [`source-budget-exceeded`](source-budget-exceeded.md)
|
|
132
|
+
- [`source-changed`](source-changed.md)
|
|
133
|
+
- [`source`](source.md)
|
|
134
|
+
- [`stale-generation`](stale-generation.md)
|
|
135
|
+
- [`stream-length-recovered`](stream-length-recovered.md)
|
|
136
|
+
- [`strict`](strict.md)
|
|
137
|
+
- [`subset-failed`](subset-failed.md)
|
|
138
|
+
- [`syntax`](syntax.md)
|
|
139
|
+
- [`tag-element-not-open`](tag-element-not-open.md)
|
|
140
|
+
- [`tag-element-unclosed`](tag-element-unclosed.md)
|
|
141
|
+
- [`text-in-earlier-revision`](text-in-earlier-revision.md)
|
|
142
|
+
- [`text-module-not-loaded`](text-module-not-loaded.md)
|
|
143
|
+
- [`text-overflow`](text-overflow.md)
|
|
144
|
+
- [`tounicode-conflict`](tounicode-conflict.md)
|
|
145
|
+
- [`type`](type.md)
|
|
146
|
+
- [`unexpected-eof`](unexpected-eof.md)
|
|
147
|
+
- [`unknown-axis`](unknown-axis.md)
|
|
148
|
+
- [`unknown-code`](unknown-code.md)
|
|
149
|
+
- [`unknown-destination`](unknown-destination.md)
|
|
150
|
+
- [`unknown-font`](unknown-font.md)
|
|
151
|
+
- [`unknown-option`](unknown-option.md)
|
|
152
|
+
- [`unknown-page`](unknown-page.md)
|
|
153
|
+
- [`unmapped-glyph`](unmapped-glyph.md)
|
|
154
|
+
- [`unnumbered-heading-misused`](unnumbered-heading-misused.md)
|
|
155
|
+
- [`unset-object`](unset-object.md)
|
|
156
|
+
- [`unsupported-filter`](unsupported-filter.md)
|
|
157
|
+
- [`unsupported-image`](unsupported-image.md)
|
|
158
|
+
- [`unsupported-layout-option`](unsupported-layout-option.md)
|
|
159
|
+
- [`unsupported-security-handler`](unsupported-security-handler.md)
|
|
160
|
+
- [`unsupported-version`](unsupported-version.md)
|
|
161
|
+
- [`untagged-content`](untagged-content.md)
|
|
162
|
+
- [`warnings-truncated`](warnings-truncated.md)
|
|
163
|
+
- [`wasm-trap`](wasm-trap.md)
|
|
164
|
+
- [`whole-font-rebuilt`](whole-font-rebuilt.md)
|
|
165
|
+
- [`worker-crashed`](worker-crashed.md)
|
|
166
|
+
- [`worker-failed`](worker-failed.md)
|
|
167
|
+
- [`worker-version-mismatch`](worker-version-mismatch.md)
|
|
168
|
+
- [`would-invalidate-signatures`](would-invalidate-signatures.md)
|
|
169
|
+
- [`wrong-document`](wrong-document.md)
|
|
170
|
+
- [`wrong-password`](wrong-password.md)
|
|
171
|
+
- [`xobject-cycle`](xobject-cycle.md)
|
|
172
|
+
- [`xref-repaired`](xref-repaired.md)
|
|
173
|
+
- [`xrefstm-ignored`](xrefstm-ignored.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "aes-padding-invalid"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/aes-padding-invalid/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# aes-padding-invalid
|
|
8
|
+
|
|
9
|
+
- Type: warning
|
|
10
|
+
- Kind: `security` (encryption, permissions or signatures block the call, or look tampered with)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
AES-encrypted data was not `IV ‖ whole blocks` or had invalid padding; it was kept as stored or unstripped.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
Damaged data, or plaintext spliced into an encrypted file (PDFex-style).
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Treat the affected strings and streams as suspect: they may have been altered or spliced in. Don't use them for anything security-relevant.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
(an AESV2 string whose last block does not end in valid PKCS#5 padding)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Lamina PDF keeps the data as stored (or unstripped) instead of failing, and raises the warning with the string's or stream's `object`.
|
|
31
|
+
|
|
32
|
+
## Data fields
|
|
33
|
+
|
|
34
|
+
None.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "already-initialized"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/already-initialized/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# already-initialized
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `state` (the call isn't valid in the object's current state)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
`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).
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
Each 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.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Pass 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.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
await init(new URL("/wasm/lamina_pdf_base.wasm", location.href));
|
|
28
|
+
await init(); // fine: the module is loaded
|
|
29
|
+
await init(otherBytes); // throws { code: "already-initialized", … }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Data fields
|
|
33
|
+
|
|
34
|
+
None.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "binary-output-to-terminal"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/binary-output-to-terminal/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# binary-output-to-terminal
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `usage` (the caller misused the API)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
A command that writes a PDF was told to write it to standard output (`-o -`), and standard output is a terminal.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
A 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.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Redirect standard output to a file or a pipe, or write to a file with `-o`.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```console
|
|
27
|
+
$ laminapdf pages rotate scan.pdf +90 -o -
|
|
28
|
+
error[binary-output-to-terminal]: standard output is a terminal
|
|
29
|
+
= hint: redirect standard output to a file or a pipe, or write to a file with -o
|
|
30
|
+
$ laminapdf pages rotate scan.pdf +90 -o - > rotated.pdf
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Data fields
|
|
34
|
+
|
|
35
|
+
None.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "builder-finished"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/builder-finished/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# builder-finished
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `state` (the call isn't valid in the object's current state)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
A `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).
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
`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.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Draw everything on a page before finishing it, and finish every page before the builder. To build more, create a new page or builder.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
const b = new WasmBuilder(undefined);
|
|
28
|
+
const page = b.page(595, 842);
|
|
29
|
+
page.finish();
|
|
30
|
+
page.save(); // throws { code: "builder-finished", … }
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Data fields
|
|
34
|
+
|
|
35
|
+
- `argument`: always `builder`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "cancelled"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/cancelled/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# cancelled
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `cancelled` (a `CancelToken` stopped the work)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
The `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.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
The caller (or a host on its behalf: an `AbortSignal`, Ctrl-C, a task cancellation) asked for the work to stop.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Nothing: 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.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```rust
|
|
27
|
+
let cancel = laminapdf::CancelToken::new();
|
|
28
|
+
cancel.cancel();
|
|
29
|
+
let err = doc.save_with(&laminapdf::SaveOptions::new(), &cancel).unwrap_err();
|
|
30
|
+
assert_eq!(err.code(), "cancelled");
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Data fields
|
|
34
|
+
|
|
35
|
+
None.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "cmap-invalid"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/cmap-invalid/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# cmap-invalid
|
|
8
|
+
|
|
9
|
+
- Type: warning
|
|
10
|
+
- Kind: `input` (the input is malformed beyond what tolerance repairs)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
A font's CMap (its Type 0 `/Encoding`) or ToUnicode CMap couldn't be fully used, for one of three reasons:
|
|
15
|
+
|
|
16
|
+
- entries that can't be read, which are skipped;
|
|
17
|
+
- 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);
|
|
18
|
+
- a `/UseCMap` chain deeper than 8 levels, cut there.
|
|
19
|
+
|
|
20
|
+
## Why
|
|
21
|
+
|
|
22
|
+
A producer bug (bad ranges, a missing `end…` keyword), or a CJK file using one of Adobe's character-collection CMaps without embedding it.
|
|
23
|
+
|
|
24
|
+
## How to fix
|
|
25
|
+
|
|
26
|
+
Nothing to do. The rest of the CMap is used; affected glyphs may extract as other text or U+FFFD.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
1 beginbfchar
|
|
32
|
+
<0003> <0020
|
|
33
|
+
endbfchar
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The destination string is not closed; the entry is skipped, and the rest of the ToUnicode CMap is used.
|
|
37
|
+
|
|
38
|
+
## Data fields
|
|
39
|
+
|
|
40
|
+
None.
|
|
41
|
+
|
|
42
|
+
The `location` is `object`, the font dictionary's object; none for a direct font dictionary.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "collection-index"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/collection-index/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# collection-index
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `usage` (the caller misused the API)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
`Font::from_collection` was asked for a member past the end of the font collection.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
Members are numbered from 0; a single font counts as a collection of one.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Use an index below `Font::collection_len(bytes)`.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```rust
|
|
27
|
+
let font = Font::from_collection(ttc_bytes, 4)?; // the collection has 4 members (0..=3): collection-index
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Data fields
|
|
31
|
+
|
|
32
|
+
- `index`: the member that was asked for.
|
|
33
|
+
- `count`: how many members the collection has.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "color-components"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/color-components/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# color-components
|
|
8
|
+
|
|
9
|
+
- Type: error
|
|
10
|
+
- Kind: `usage` (the caller misused the API)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
`Color::icc` was given a number of components that differs from the profile's channel count.
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
An `ICCBased` colour has one component per channel of its profile (`/N`: Gray 1, RGB and Lab 3, CMYK 4).
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Give `IccProfile::components()` values.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```rust
|
|
27
|
+
let c = Color::icc(&cmyk_profile, &[0.1, 0.2, 0.3])?; // color-components: 4 expected
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Data fields
|
|
31
|
+
|
|
32
|
+
- `expected`: the colour space's number of components.
|
|
33
|
+
- `actual`: how many were given.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "content-bad-operands"
|
|
3
|
+
version: "0.2.0-alpha.4"
|
|
4
|
+
url: "https://docs.laminapdf.com/reference/codes/content-bad-operands/"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# content-bad-operands
|
|
8
|
+
|
|
9
|
+
- Type: warning
|
|
10
|
+
- Kind: `input` (the input is malformed beyond what tolerance repairs)
|
|
11
|
+
|
|
12
|
+
## What happened
|
|
13
|
+
|
|
14
|
+
An operator had too few operands or operands of the wrong type (it was skipped), or extra operands (the last ones were used).
|
|
15
|
+
|
|
16
|
+
## Why
|
|
17
|
+
|
|
18
|
+
A producer bug, or damaged content.
|
|
19
|
+
|
|
20
|
+
## How to fix
|
|
21
|
+
|
|
22
|
+
Nothing to do.
|
|
23
|
+
|
|
24
|
+
## Example
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
72 Td
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`Td` takes two numbers; with one, the operator is skipped.
|
|
31
|
+
|
|
32
|
+
## Data fields
|
|
33
|
+
|
|
34
|
+
- `offset`: the operator's byte offset in the decoded content.
|
|
35
|
+
|
|
36
|
+
The `location` is `object` (the page for page content, the Form XObject for a form) with `streamOffset` in its decoded content; none for content interpreted on its own or a direct page.
|