pdf-codec 4.0.13 → 4.2.0

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.
Files changed (66) hide show
  1. package/README.md +6 -5
  2. package/dist/annotations.d.cts +1 -1
  3. package/dist/annotations.d.ts +1 -1
  4. package/dist/attachments.d.cts +1 -1
  5. package/dist/attachments.d.ts +1 -1
  6. package/dist/content-read.d.cts +1 -1
  7. package/dist/content-read.d.ts +1 -1
  8. package/dist/crypto/random.cjs +9 -0
  9. package/dist/crypto/random.d.cts +4 -0
  10. package/dist/crypto/random.d.ts +4 -0
  11. package/dist/crypto/random.js +8 -0
  12. package/dist/document.d.cts +1 -1
  13. package/dist/document.d.ts +1 -1
  14. package/dist/embedded-font-write.d.cts +1 -1
  15. package/dist/embedded-font-write.d.ts +1 -1
  16. package/dist/encrypt-write.cjs +234 -0
  17. package/dist/encrypt-write.d.cts +31 -0
  18. package/dist/encrypt-write.d.ts +31 -0
  19. package/dist/encrypt-write.js +231 -0
  20. package/dist/encrypt.cjs +50 -20
  21. package/dist/encrypt.d.cts +18 -2
  22. package/dist/encrypt.d.ts +18 -2
  23. package/dist/encrypt.js +35 -21
  24. package/dist/filters.d.cts +1 -1
  25. package/dist/filters.d.ts +1 -1
  26. package/dist/font-read.d.cts +1 -1
  27. package/dist/font-read.d.ts +1 -1
  28. package/dist/form.d.cts +1 -1
  29. package/dist/form.d.ts +1 -1
  30. package/dist/images-read.d.cts +1 -1
  31. package/dist/images-read.d.ts +1 -1
  32. package/dist/index.cjs +2 -0
  33. package/dist/index.d.cts +2 -1
  34. package/dist/index.d.ts +2 -1
  35. package/dist/index.js +2 -1
  36. package/dist/interpret.d.cts +1 -1
  37. package/dist/interpret.d.ts +1 -1
  38. package/dist/math-font-write.d.cts +1 -1
  39. package/dist/math-font-write.d.ts +1 -1
  40. package/dist/names.d.cts +1 -1
  41. package/dist/names.d.ts +1 -1
  42. package/dist/navigation.d.cts +1 -1
  43. package/dist/navigation.d.ts +1 -1
  44. package/dist/objects-B7HdMeWS.d.cts +59 -0
  45. package/dist/objects-B7HdMeWS.d.ts +59 -0
  46. package/dist/objects.d.cts +1 -58
  47. package/dist/objects.d.ts +1 -58
  48. package/dist/optional-content.d.cts +1 -1
  49. package/dist/optional-content.d.ts +1 -1
  50. package/dist/parse.d.cts +1 -1
  51. package/dist/parse.d.ts +1 -1
  52. package/dist/predictors.d.cts +1 -1
  53. package/dist/predictors.d.ts +1 -1
  54. package/dist/serialize.d.cts +1 -1
  55. package/dist/serialize.d.ts +1 -1
  56. package/dist/structure.d.cts +1 -1
  57. package/dist/structure.d.ts +1 -1
  58. package/dist/tounicode.d.cts +1 -1
  59. package/dist/tounicode.d.ts +1 -1
  60. package/dist/write.cjs +123 -15
  61. package/dist/write.d.cts +2 -0
  62. package/dist/write.d.ts +2 -0
  63. package/dist/write.js +124 -16
  64. package/dist/xref.d.cts +1 -1
  65. package/dist/xref.d.ts +1 -1
  66. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -5,6 +5,7 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.cjs";
5
5
  import { PdfBytesSchema, pdfCodec } from "./codec.cjs";
6
6
  import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-BU6Jgcof.cjs";
7
7
  import { WinAnsiSubstitution } from "./winansi.cjs";
8
+ import { PdfEncryptionError, PdfEncryptionOptions, PdfEncryptionPermissions, PdfEncryptionScheme } from "./encrypt-write.cjs";
8
9
  import { FontFace, FontFaceParseError, readFontFace } from "./font-face.cjs";
9
10
  import { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry } from "./font-registry.cjs";
10
11
  import { ResolvedFont, resolveStandardFont } from "./fonts.cjs";
@@ -24,4 +25,4 @@ import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } fro
24
25
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.cjs";
25
26
  import { FontRegistryOptions, FontSubstitution, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, Point, PositionedFormula, ProvidedFont, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "document-schema.js";
26
27
  export * from "byte-codec";
27
- export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, type LoadedMathFont, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError, type Point, type PositionedFormula, type ProvidedFont, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
28
+ export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, type LoadedMathFont, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfEncryptionError, type PdfEncryptionOptions, type PdfEncryptionPermissions, type PdfEncryptionScheme, PdfParseError, PdfPasswordRequiredError, type Point, type PositionedFormula, type ProvidedFont, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { t as GlyphInkBounds } from "./glyph-bounds-BV_Z40KS.js";
5
5
  import { PdfBytesSchema, pdfCodec } from "./codec.js";
6
6
  import { n as EmbeddedFaceMetrics, r as EmbeddedFaceSubstitution, t as EmbeddedFace } from "./embedded-font-fREdbxnr.js";
7
7
  import { WinAnsiSubstitution } from "./winansi.js";
8
+ import { PdfEncryptionError, PdfEncryptionOptions, PdfEncryptionPermissions, PdfEncryptionScheme } from "./encrypt-write.js";
8
9
  import { FontFace, FontFaceParseError, readFontFace } from "./font-face.js";
9
10
  import { FontRegistry, ResolvedFace, createFontRegistry, resolveFaceWithRegistry } from "./font-registry.js";
10
11
  import { ResolvedFont, resolveStandardFont } from "./fonts.js";
@@ -24,4 +25,4 @@ import { LoadedMathFont, MathFont, MathFontDescriptorMetrics, loadMathFont } fro
24
25
  import { DEFAULT_VERTICAL_METRIC_POLICY, FontMeasurerOptions, StandardFontMeasurerOptions, VerticalMetricPolicy, createFontMeasurer, createStandardFontMeasurer } from "./measure.js";
25
26
  import { FontRegistryOptions, FontSubstitution, MathAssembledGlyphs, MathBox, MathColor, MathFontMetrics, MathGlyphMetrics, MathGlyphPlacement, MathGlyphRun, MathLayoutItem, MathRule, MathStretchAxis, MathStretchGlyph, MathStretchResult, MathStroke, Point, PositionedFormula, ProvidedFont, StyledFragment, StyledRun, TextMeasurer, UnderlineMetrics, WrapOptions, WrappedLine } from "document-schema.js";
26
27
  export * from "byte-codec";
27
- export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, type LoadedMathFont, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError, type Point, type PositionedFormula, type ProvidedFont, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
28
+ export { type CcittFaxImage, type CcittFaxOptions, DEFAULT_VERTICAL_METRIC_POLICY, type EmbeddedFace, type EmbeddedFaceMetrics, type EmbeddedFaceSubstitution, type FontFace, FontFaceParseError, type FontMeasurerOptions, type FontMetrics, type FontRegistry, type FontRegistryOptions, type FontSubstitution, type GlyphInkBounds, type Jbig2DecodeOptions, type Jbig2Image, Jbig2ParseError, Jbig2UnsupportedError, type Jp2ChannelDefinition, type Jp2ColourSpace, type Jp2Container, type Jp2ImageHeader, type Jpeg2000ComponentMetadata, type Jpeg2000DecodeOptions, type Jpeg2000Image, type Jpeg2000Metadata, Jpeg2000ParseError, type Jpeg2000ProgressionOrder, type Jpeg2000QuantizationStyle, type Jpeg2000Transform, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotation, LayoutAnnotationQuad, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachment, LayoutAttachmentSchema, LayoutDestination, LayoutDestinationSchema, LayoutDestinationTarget, LayoutDestinationTargetSchema, LayoutDocument, LayoutDocumentSchema, LayoutEllipse, LayoutEllipseSchema, LayoutFormField, LayoutFormFieldSchema, LayoutFormWidget, LayoutFormWidgetSchema, LayoutImage, LayoutImageAsset, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLink, LayoutInternalLinkSchema, LayoutItem, LayoutItemSchema, LayoutLayer, LayoutLayerSchema, LayoutLine, LayoutLineSchema, LayoutLink, LayoutLinkSchema, LayoutOutlineItem, LayoutOutlineItemSchema, LayoutPage, LayoutPageSchema, LayoutPath, LayoutPathSchema, LayoutPathSegment, LayoutPathSegmentSchema, LayoutRect, LayoutRectSchema, LayoutStructureElement, LayoutStructureElementSchema, LayoutSubpath, LayoutSubpathSchema, LayoutText, LayoutTextSchema, type LoadedMathFont, type MathAssembledGlyphs, type MathBox, type MathColor, type MathFont, type MathFontDescriptorMetrics, type MathFontMetrics, type MathGlyphAssembly, type MathGlyphConstruction, type MathGlyphMetrics, type MathGlyphPart, type MathGlyphPlacement, type MathGlyphRun, type MathGlyphVariant, type MathLayoutItem, type MathRule, type MathStretchAxis, type MathStretchConstruction, type MathStretchGlyph, type MathStretchOptions, type MathStretchPlacement, type MathStretchResult, type MathStroke, type MathVariants, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfEncryptionError, type PdfEncryptionOptions, type PdfEncryptionPermissions, type PdfEncryptionScheme, PdfParseError, PdfPasswordRequiredError, type Point, type PositionedFormula, type ProvidedFont, type ReadPdfOptions, type ResolvedFace, type ResolvedFont, STANDARD_METRICS, type StandardFontMeasurerOptions, type StandardFontName, type StyledFragment, type StyledRun, type TextMeasurer, type UnderlineMetrics, type VerticalMetricPolicy, type WinAnsiSubstitution, type WrapOptions, type WrappedLine, type WritePdfOptions, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ import { Jpeg2000ParseError, Jpeg2000UnsupportedError } from "./image/jpeg2000-e
10
10
  import { looksLikeBareCodestream, parseJp2Container } from "./image/jp2-boxes.js";
11
11
  import { decodeJpeg2000, readJpeg2000Metadata } from "./image/jpeg2000.js";
12
12
  import { readPdf } from "./read.js";
13
+ import { PdfEncryptionError } from "./encrypt-write.js";
13
14
  import { createFontRegistry, resolveFaceWithRegistry } from "./font-registry.js";
14
15
  import { assembleStretchyGlyph, scaleMathStretchConstruction } from "./math-stretch.js";
15
16
  import { loadMathFont } from "./math-font.js";
@@ -18,4 +19,4 @@ import { writePdf } from "./write.js";
18
19
  import { PdfBytesSchema, pdfCodec } from "./codec.js";
19
20
  import { FontFaceParseError, readFontFace } from "./font-face.js";
20
21
  export * from "byte-codec";
21
- export { DEFAULT_VERTICAL_METRIC_POLICY, FontFaceParseError, Jbig2ParseError, Jbig2UnsupportedError, Jpeg2000ParseError, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachmentSchema, LayoutDestinationSchema, LayoutDestinationTargetSchema, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFormFieldSchema, LayoutFormWidgetSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLinkSchema, LayoutItemSchema, LayoutLayerSchema, LayoutLineSchema, LayoutLinkSchema, LayoutOutlineItemSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutStructureElementSchema, LayoutSubpathSchema, LayoutTextSchema, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, PdfEncryptedError, PdfParseError, PdfPasswordRequiredError, STANDARD_METRICS, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
22
+ export { DEFAULT_VERTICAL_METRIC_POLICY, FontFaceParseError, Jbig2ParseError, Jbig2UnsupportedError, Jpeg2000ParseError, Jpeg2000UnsupportedError, LAYOUT_FORMAT_VERSION, LayoutAnnotationQuadSchema, LayoutAnnotationSchema, LayoutAttachmentSchema, LayoutDestinationSchema, LayoutDestinationTargetSchema, LayoutDocumentSchema, LayoutEllipseSchema, LayoutFormFieldSchema, LayoutFormWidgetSchema, LayoutImageAssetSchema, LayoutImageSchema, LayoutInternalLinkSchema, LayoutItemSchema, LayoutLayerSchema, LayoutLineSchema, LayoutLinkSchema, LayoutOutlineItemSchema, LayoutPageSchema, LayoutPathSchema, LayoutPathSegmentSchema, LayoutRectSchema, LayoutStructureElementSchema, LayoutSubpathSchema, LayoutTextSchema, NOOP_DIAGNOSTIC_SINK, PdfBytesSchema, PdfEncryptedError, PdfEncryptionError, PdfParseError, PdfPasswordRequiredError, STANDARD_METRICS, assembleStretchyGlyph, createFontMeasurer, createFontRegistry, createStandardFontMeasurer, decodeCcittFax, decodeJbig2Embedded, decodeJpeg2000, filterScanlines, loadMathFont, looksLikeBareCodestream, parseJp2Container, pdfCodec, readFontFace, readJpeg2000Metadata, readPdf, resolveFaceWithRegistry, resolveStandardFont, scaleMathStretchConstruction, unfilterScanlines, writePdf };
@@ -1,6 +1,6 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
2
  import { r as Matrix } from "./matrix-B7_SBKQ5.cjs";
3
- import { PdfDict, PdfObject } from "./objects.cjs";
3
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
4
4
  import { Color, ContentStrokeStyle } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
@@ -1,6 +1,6 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
2
  import { r as Matrix } from "./matrix-B7_SBKQ5.js";
3
- import { PdfDict, PdfObject } from "./objects.js";
3
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
4
4
  import { Color, ContentStrokeStyle } from "document-schema.js";
5
5
  //#region src/interpret.d.ts
6
6
  interface ExtractedTextRun {
@@ -1,4 +1,4 @@
1
- import { PdfDict, PdfObject } from "./objects.cjs";
1
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
2
2
  import { MathFont } from "./math-font.cjs";
3
3
  //#region src/math-font-write.d.ts
4
4
  interface MathFontObjectRefs {
@@ -1,4 +1,4 @@
1
- import { PdfDict, PdfObject } from "./objects.js";
1
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
2
2
  import { MathFont } from "./math-font.js";
3
3
  //#region src/math-font-write.d.ts
4
4
  interface MathFontObjectRefs {
package/dist/names.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfObject } from "./objects.cjs";
2
+ import { r as PdfObject } from "./objects-B7HdMeWS.cjs";
3
3
  import { PdfObjectResolver } from "./interpret.cjs";
4
4
  //#region src/names.d.ts
5
5
  interface NameTreeEntry {
package/dist/names.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfObject } from "./objects.js";
2
+ import { r as PdfObject } from "./objects-B7HdMeWS.js";
3
3
  import { PdfObjectResolver } from "./interpret.js";
4
4
  //#region src/names.d.ts
5
5
  interface NameTreeEntry {
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfDict, PdfObject } from "./objects.cjs";
2
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
3
3
  import { PdfObjectResolver } from "./interpret.cjs";
4
4
  import { LayoutDestination, LayoutDestinationTarget, LayoutOutlineItem } from "./layout.cjs";
5
5
  //#region src/navigation.d.ts
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfDict, PdfObject } from "./objects.js";
2
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
3
3
  import { PdfObjectResolver } from "./interpret.js";
4
4
  import { LayoutDestination, LayoutDestinationTarget, LayoutOutlineItem } from "./layout.js";
5
5
  //#region src/navigation.d.ts
@@ -0,0 +1,59 @@
1
+ //#region src/objects.d.ts
2
+ type PdfObject = {
3
+ kind: "null";
4
+ } | {
5
+ kind: "bool";
6
+ value: boolean;
7
+ } | {
8
+ kind: "number";
9
+ value: number;
10
+ } | {
11
+ kind: "name";
12
+ name: string;
13
+ } | {
14
+ kind: "string";
15
+ bytes: Uint8Array<ArrayBuffer>;
16
+ hex: boolean;
17
+ } | {
18
+ kind: "array";
19
+ items: PdfObject[];
20
+ } | {
21
+ kind: "dict";
22
+ entries: Map<string, PdfObject>;
23
+ } | {
24
+ kind: "stream";
25
+ dict: PdfDict;
26
+ raw: Uint8Array<ArrayBuffer>;
27
+ } | {
28
+ kind: "ref";
29
+ num: number;
30
+ gen: number;
31
+ };
32
+ type PdfDict = Extract<PdfObject, {
33
+ kind: "dict";
34
+ }>;
35
+ type PdfArray = Extract<PdfObject, {
36
+ kind: "array";
37
+ }>;
38
+ type PdfStream = Extract<PdfObject, {
39
+ kind: "stream";
40
+ }>;
41
+ declare function pdfNull(): PdfObject;
42
+ declare function pdfBool(value: boolean): PdfObject;
43
+ declare function pdfNum(value: number): PdfObject;
44
+ declare function pdfName(name: string): PdfObject;
45
+ declare function pdfHexString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
46
+ declare function pdfLiteralString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
47
+ declare function pdfArray(items: PdfObject[]): PdfObject;
48
+ declare function pdfDict(entries: Record<string, PdfObject> | Map<string, PdfObject>): PdfDict;
49
+ declare function pdfStream(dict: PdfDict, raw: Uint8Array<ArrayBuffer>): PdfObject;
50
+ declare function pdfRef(num: number, gen: number): PdfObject;
51
+ declare function isName(obj: PdfObject | undefined, name: string): boolean;
52
+ declare function asNumber(obj: PdfObject | undefined): number | undefined;
53
+ declare function asName(obj: PdfObject | undefined): string | undefined;
54
+ declare function asBool(obj: PdfObject | undefined): boolean | undefined;
55
+ declare function asArray(obj: PdfObject | undefined): PdfObject[] | undefined;
56
+ declare function asDict(obj: PdfObject | undefined): PdfDict | undefined;
57
+ declare function dictGet(dict: PdfDict, key: string): PdfObject | undefined;
58
+ //#endregion
59
+ export { pdfName as _, asArray as a, pdfRef as b, asName as c, isName as d, pdfArray as f, pdfLiteralString as g, pdfHexString as h, PdfStream as i, asNumber as l, pdfDict as m, PdfDict as n, asBool as o, pdfBool as p, PdfObject as r, asDict as s, PdfArray as t, dictGet as u, pdfNull as v, pdfStream as x, pdfNum as y };
@@ -0,0 +1,59 @@
1
+ //#region src/objects.d.ts
2
+ type PdfObject = {
3
+ kind: "null";
4
+ } | {
5
+ kind: "bool";
6
+ value: boolean;
7
+ } | {
8
+ kind: "number";
9
+ value: number;
10
+ } | {
11
+ kind: "name";
12
+ name: string;
13
+ } | {
14
+ kind: "string";
15
+ bytes: Uint8Array<ArrayBuffer>;
16
+ hex: boolean;
17
+ } | {
18
+ kind: "array";
19
+ items: PdfObject[];
20
+ } | {
21
+ kind: "dict";
22
+ entries: Map<string, PdfObject>;
23
+ } | {
24
+ kind: "stream";
25
+ dict: PdfDict;
26
+ raw: Uint8Array<ArrayBuffer>;
27
+ } | {
28
+ kind: "ref";
29
+ num: number;
30
+ gen: number;
31
+ };
32
+ type PdfDict = Extract<PdfObject, {
33
+ kind: "dict";
34
+ }>;
35
+ type PdfArray = Extract<PdfObject, {
36
+ kind: "array";
37
+ }>;
38
+ type PdfStream = Extract<PdfObject, {
39
+ kind: "stream";
40
+ }>;
41
+ declare function pdfNull(): PdfObject;
42
+ declare function pdfBool(value: boolean): PdfObject;
43
+ declare function pdfNum(value: number): PdfObject;
44
+ declare function pdfName(name: string): PdfObject;
45
+ declare function pdfHexString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
46
+ declare function pdfLiteralString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
47
+ declare function pdfArray(items: PdfObject[]): PdfObject;
48
+ declare function pdfDict(entries: Record<string, PdfObject> | Map<string, PdfObject>): PdfDict;
49
+ declare function pdfStream(dict: PdfDict, raw: Uint8Array<ArrayBuffer>): PdfObject;
50
+ declare function pdfRef(num: number, gen: number): PdfObject;
51
+ declare function isName(obj: PdfObject | undefined, name: string): boolean;
52
+ declare function asNumber(obj: PdfObject | undefined): number | undefined;
53
+ declare function asName(obj: PdfObject | undefined): string | undefined;
54
+ declare function asBool(obj: PdfObject | undefined): boolean | undefined;
55
+ declare function asArray(obj: PdfObject | undefined): PdfObject[] | undefined;
56
+ declare function asDict(obj: PdfObject | undefined): PdfDict | undefined;
57
+ declare function dictGet(dict: PdfDict, key: string): PdfObject | undefined;
58
+ //#endregion
59
+ export { pdfName as _, asArray as a, pdfRef as b, asName as c, isName as d, pdfArray as f, pdfLiteralString as g, pdfHexString as h, PdfStream as i, asNumber as l, pdfDict as m, PdfDict as n, asBool as o, pdfBool as p, PdfObject as r, asDict as s, PdfArray as t, dictGet as u, pdfNull as v, pdfStream as x, pdfNum as y };
@@ -1,59 +1,2 @@
1
- //#region src/objects.d.ts
2
- type PdfObject = {
3
- kind: "null";
4
- } | {
5
- kind: "bool";
6
- value: boolean;
7
- } | {
8
- kind: "number";
9
- value: number;
10
- } | {
11
- kind: "name";
12
- name: string;
13
- } | {
14
- kind: "string";
15
- bytes: Uint8Array<ArrayBuffer>;
16
- hex: boolean;
17
- } | {
18
- kind: "array";
19
- items: PdfObject[];
20
- } | {
21
- kind: "dict";
22
- entries: Map<string, PdfObject>;
23
- } | {
24
- kind: "stream";
25
- dict: PdfDict;
26
- raw: Uint8Array<ArrayBuffer>;
27
- } | {
28
- kind: "ref";
29
- num: number;
30
- gen: number;
31
- };
32
- type PdfDict = Extract<PdfObject, {
33
- kind: "dict";
34
- }>;
35
- type PdfArray = Extract<PdfObject, {
36
- kind: "array";
37
- }>;
38
- type PdfStream = Extract<PdfObject, {
39
- kind: "stream";
40
- }>;
41
- declare function pdfNull(): PdfObject;
42
- declare function pdfBool(value: boolean): PdfObject;
43
- declare function pdfNum(value: number): PdfObject;
44
- declare function pdfName(name: string): PdfObject;
45
- declare function pdfHexString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
46
- declare function pdfLiteralString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
47
- declare function pdfArray(items: PdfObject[]): PdfObject;
48
- declare function pdfDict(entries: Record<string, PdfObject> | Map<string, PdfObject>): PdfDict;
49
- declare function pdfStream(dict: PdfDict, raw: Uint8Array<ArrayBuffer>): PdfObject;
50
- declare function pdfRef(num: number, gen: number): PdfObject;
51
- declare function isName(obj: PdfObject | undefined, name: string): boolean;
52
- declare function asNumber(obj: PdfObject | undefined): number | undefined;
53
- declare function asName(obj: PdfObject | undefined): string | undefined;
54
- declare function asBool(obj: PdfObject | undefined): boolean | undefined;
55
- declare function asArray(obj: PdfObject | undefined): PdfObject[] | undefined;
56
- declare function asDict(obj: PdfObject | undefined): PdfDict | undefined;
57
- declare function dictGet(dict: PdfDict, key: string): PdfObject | undefined;
58
- //#endregion
1
+ import { _ as pdfName, a as asArray, b as pdfRef, c as asName, d as isName, f as pdfArray, g as pdfLiteralString, h as pdfHexString, i as PdfStream, l as asNumber, m as pdfDict, n as PdfDict, o as asBool, p as pdfBool, r as PdfObject, s as asDict, t as PdfArray, u as dictGet, v as pdfNull, x as pdfStream, y as pdfNum } from "./objects-B7HdMeWS.cjs";
59
2
  export { PdfArray, PdfDict, PdfObject, PdfStream, asArray, asBool, asDict, asName, asNumber, dictGet, isName, pdfArray, pdfBool, pdfDict, pdfHexString, pdfLiteralString, pdfName, pdfNull, pdfNum, pdfRef, pdfStream };
package/dist/objects.d.ts CHANGED
@@ -1,59 +1,2 @@
1
- //#region src/objects.d.ts
2
- type PdfObject = {
3
- kind: "null";
4
- } | {
5
- kind: "bool";
6
- value: boolean;
7
- } | {
8
- kind: "number";
9
- value: number;
10
- } | {
11
- kind: "name";
12
- name: string;
13
- } | {
14
- kind: "string";
15
- bytes: Uint8Array<ArrayBuffer>;
16
- hex: boolean;
17
- } | {
18
- kind: "array";
19
- items: PdfObject[];
20
- } | {
21
- kind: "dict";
22
- entries: Map<string, PdfObject>;
23
- } | {
24
- kind: "stream";
25
- dict: PdfDict;
26
- raw: Uint8Array<ArrayBuffer>;
27
- } | {
28
- kind: "ref";
29
- num: number;
30
- gen: number;
31
- };
32
- type PdfDict = Extract<PdfObject, {
33
- kind: "dict";
34
- }>;
35
- type PdfArray = Extract<PdfObject, {
36
- kind: "array";
37
- }>;
38
- type PdfStream = Extract<PdfObject, {
39
- kind: "stream";
40
- }>;
41
- declare function pdfNull(): PdfObject;
42
- declare function pdfBool(value: boolean): PdfObject;
43
- declare function pdfNum(value: number): PdfObject;
44
- declare function pdfName(name: string): PdfObject;
45
- declare function pdfHexString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
46
- declare function pdfLiteralString(bytes: Uint8Array<ArrayBuffer>): PdfObject;
47
- declare function pdfArray(items: PdfObject[]): PdfObject;
48
- declare function pdfDict(entries: Record<string, PdfObject> | Map<string, PdfObject>): PdfDict;
49
- declare function pdfStream(dict: PdfDict, raw: Uint8Array<ArrayBuffer>): PdfObject;
50
- declare function pdfRef(num: number, gen: number): PdfObject;
51
- declare function isName(obj: PdfObject | undefined, name: string): boolean;
52
- declare function asNumber(obj: PdfObject | undefined): number | undefined;
53
- declare function asName(obj: PdfObject | undefined): string | undefined;
54
- declare function asBool(obj: PdfObject | undefined): boolean | undefined;
55
- declare function asArray(obj: PdfObject | undefined): PdfObject[] | undefined;
56
- declare function asDict(obj: PdfObject | undefined): PdfDict | undefined;
57
- declare function dictGet(dict: PdfDict, key: string): PdfObject | undefined;
58
- //#endregion
1
+ import { _ as pdfName, a as asArray, b as pdfRef, c as asName, d as isName, f as pdfArray, g as pdfLiteralString, h as pdfHexString, i as PdfStream, l as asNumber, m as pdfDict, n as PdfDict, o as asBool, p as pdfBool, r as PdfObject, s as asDict, t as PdfArray, u as dictGet, v as pdfNull, x as pdfStream, y as pdfNum } from "./objects-B7HdMeWS.js";
59
2
  export { PdfArray, PdfDict, PdfObject, PdfStream, asArray, asBool, asDict, asName, asNumber, dictGet, isName, pdfArray, pdfBool, pdfDict, pdfHexString, pdfLiteralString, pdfName, pdfNull, pdfNum, pdfRef, pdfStream };
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfDict, PdfObject } from "./objects.cjs";
2
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.cjs";
3
3
  import { PdfObjectResolver } from "./interpret.cjs";
4
4
  import { LayoutLayer } from "./layout.cjs";
5
5
  //#region src/optional-content.d.ts
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfDict, PdfObject } from "./objects.js";
2
+ import { n as PdfDict, r as PdfObject } from "./objects-B7HdMeWS.js";
3
3
  import { PdfObjectResolver } from "./interpret.js";
4
4
  import { LayoutLayer } from "./layout.js";
5
5
  //#region src/optional-content.d.ts
package/dist/parse.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfObject } from "./objects.cjs";
2
+ import { r as PdfObject } from "./objects-B7HdMeWS.cjs";
3
3
  import { ByteReader } from "./bytes/reader.cjs";
4
4
  //#region src/parse.d.ts
5
5
  declare function parseValue(reader: ByteReader, sink: PdfDiagnosticSink): PdfObject | undefined;
package/dist/parse.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfObject } from "./objects.js";
2
+ import { r as PdfObject } from "./objects-B7HdMeWS.js";
3
3
  import { ByteReader } from "./bytes/reader.js";
4
4
  //#region src/parse.d.ts
5
5
  declare function parseValue(reader: ByteReader, sink: PdfDiagnosticSink): PdfObject | undefined;
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfDict } from "./objects.cjs";
2
+ import { n as PdfDict } from "./objects-B7HdMeWS.cjs";
3
3
  //#region src/predictors.d.ts
4
4
  interface PredictorParams {
5
5
  readonly predictor: number;
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfDict } from "./objects.js";
2
+ import { n as PdfDict } from "./objects-B7HdMeWS.js";
3
3
  //#region src/predictors.d.ts
4
4
  interface PredictorParams {
5
5
  readonly predictor: number;
@@ -1,4 +1,4 @@
1
- import { PdfObject } from "./objects.cjs";
1
+ import { r as PdfObject } from "./objects-B7HdMeWS.cjs";
2
2
  import { ByteWriter } from "./bytes/writer.cjs";
3
3
  //#region src/serialize.d.ts
4
4
  declare function formatNumber(n: number): string;
@@ -1,4 +1,4 @@
1
- import { PdfObject } from "./objects.js";
1
+ import { r as PdfObject } from "./objects-B7HdMeWS.js";
2
2
  import { ByteWriter } from "./bytes/writer.js";
3
3
  //#region src/serialize.d.ts
4
4
  declare function formatNumber(n: number): string;
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.cjs";
2
- import { PdfDict } from "./objects.cjs";
2
+ import { n as PdfDict } from "./objects-B7HdMeWS.cjs";
3
3
  import { PdfObjectResolver } from "./interpret.cjs";
4
4
  import { LayoutStructureElement } from "./layout.cjs";
5
5
  //#region src/structure.d.ts
@@ -1,5 +1,5 @@
1
1
  import { PdfDiagnosticSink } from "./diagnostics.js";
2
- import { PdfDict } from "./objects.js";
2
+ import { n as PdfDict } from "./objects-B7HdMeWS.js";
3
3
  import { PdfObjectResolver } from "./interpret.js";
4
4
  import { LayoutStructureElement } from "./layout.js";
5
5
  //#region src/structure.d.ts
@@ -1,4 +1,4 @@
1
- import { PdfObject } from "./objects.cjs";
1
+ import { r as PdfObject } from "./objects-B7HdMeWS.cjs";
2
2
  //#region src/tounicode.d.ts
3
3
  declare function buildToUnicodeCMap(codeToCodePoint: ReadonlyMap<number, number>): PdfObject;
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- import { PdfObject } from "./objects.js";
1
+ import { r as PdfObject } from "./objects-B7HdMeWS.js";
2
2
  //#region src/tounicode.d.ts
3
3
  declare function buildToUnicodeCMap(codeToCodePoint: ReadonlyMap<number, number>): PdfObject;
4
4
  //#endregion