@pdfme/pdf-lib 6.1.12 → 6.1.13
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/dist/api/PDFDocument.d.ts +11 -11
- package/dist/api/PDFDocumentOptions.d.ts +2 -2
- package/dist/api/PDFEmbeddedFile.d.ts +4 -4
- package/dist/api/PDFEmbeddedPage.d.ts +3 -3
- package/dist/api/PDFFont.d.ts +3 -3
- package/dist/api/PDFImage.d.ts +3 -3
- package/dist/api/PDFJavaScript.d.ts +4 -4
- package/dist/api/PDFPage.d.ts +8 -8
- package/dist/api/PDFPageOptions.d.ts +5 -5
- package/dist/api/colors.d.ts +3 -3
- package/dist/api/form/PDFButton.d.ts +8 -8
- package/dist/api/form/PDFCheckBox.d.ts +5 -5
- package/dist/api/form/PDFDropdown.d.ts +6 -6
- package/dist/api/form/PDFField.d.ts +8 -8
- package/dist/api/form/PDFForm.d.ts +11 -11
- package/dist/api/form/PDFOptionList.d.ts +6 -6
- package/dist/api/form/PDFRadioGroup.d.ts +5 -5
- package/dist/api/form/PDFSignature.d.ts +3 -3
- package/dist/api/form/PDFTextField.d.ts +8 -8
- package/dist/api/form/appearances.d.ts +10 -10
- package/dist/api/form/index.d.ts +10 -10
- package/dist/api/image/index.d.ts +1 -1
- package/dist/api/index.d.ts +20 -20
- package/dist/api/objects.d.ts +1 -1
- package/dist/api/operations.d.ts +5 -5
- package/dist/api/operators.d.ts +1 -1
- package/dist/api/svg.d.ts +7 -7
- package/dist/api/svgPath.d.ts +1 -1
- package/dist/api/text/index.d.ts +2 -2
- package/dist/api/text/layout.d.ts +3 -3
- package/dist/core/PDFContext.d.ts +16 -16
- package/dist/core/PDFObjectCopier.d.ts +2 -2
- package/dist/core/acroform/PDFAcroButton.d.ts +7 -7
- package/dist/core/acroform/PDFAcroCheckBox.d.ts +5 -5
- package/dist/core/acroform/PDFAcroChoice.d.ts +4 -4
- package/dist/core/acroform/PDFAcroComboBox.d.ts +4 -4
- package/dist/core/acroform/PDFAcroField.d.ts +8 -8
- package/dist/core/acroform/PDFAcroForm.d.ts +5 -5
- package/dist/core/acroform/PDFAcroListBox.d.ts +4 -4
- package/dist/core/acroform/PDFAcroNonTerminal.d.ts +5 -5
- package/dist/core/acroform/PDFAcroPushButton.d.ts +4 -4
- package/dist/core/acroform/PDFAcroRadioButton.d.ts +5 -5
- package/dist/core/acroform/PDFAcroSignature.d.ts +3 -3
- package/dist/core/acroform/PDFAcroTerminal.d.ts +6 -6
- package/dist/core/acroform/PDFAcroText.d.ts +7 -7
- package/dist/core/acroform/index.d.ts +15 -15
- package/dist/core/acroform/utils.d.ts +4 -4
- package/dist/core/annotation/AppearanceCharacteristics.d.ts +5 -5
- package/dist/core/annotation/BorderStyle.d.ts +2 -2
- package/dist/core/annotation/PDFAnnotation.d.ts +6 -6
- package/dist/core/annotation/PDFWidgetAnnotation.d.ts +9 -9
- package/dist/core/annotation/index.d.ts +4 -4
- package/dist/core/document/PDFCrossRefSection.d.ts +1 -1
- package/dist/core/document/PDFTrailerDict.d.ts +1 -1
- package/dist/core/embedders/CMap.d.ts +1 -1
- package/dist/core/embedders/CustomFontEmbedder.d.ts +5 -5
- package/dist/core/embedders/CustomFontSubsetEmbedder.d.ts +3 -3
- package/dist/core/embedders/FileEmbedder.d.ts +2 -2
- package/dist/core/embedders/FontFlags.d.ts +1 -1
- package/dist/core/embedders/JavaScriptEmbedder.d.ts +2 -2
- package/dist/core/embedders/JpegEmbedder.d.ts +2 -2
- package/dist/core/embedders/PDFPageEmbedder.d.ts +4 -4
- package/dist/core/embedders/PngEmbedder.d.ts +2 -2
- package/dist/core/embedders/StandardFontEmbedder.d.ts +3 -3
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/index.d.ts +47 -47
- package/dist/core/interactive/ViewerPreferences.d.ts +6 -6
- package/dist/core/objects/PDFArray.d.ts +12 -12
- package/dist/core/objects/PDFBool.d.ts +1 -1
- package/dist/core/objects/PDFDict.d.ts +11 -11
- package/dist/core/objects/PDFHexString.d.ts +1 -1
- package/dist/core/objects/PDFInvalidObject.d.ts +1 -1
- package/dist/core/objects/PDFName.d.ts +1 -1
- package/dist/core/objects/PDFNull.d.ts +1 -1
- package/dist/core/objects/PDFNumber.d.ts +1 -1
- package/dist/core/objects/PDFObject.d.ts +1 -1
- package/dist/core/objects/PDFRawStream.d.ts +4 -4
- package/dist/core/objects/PDFRef.d.ts +1 -1
- package/dist/core/objects/PDFStream.d.ts +3 -3
- package/dist/core/objects/PDFString.d.ts +1 -1
- package/dist/core/operators/PDFOperator.d.ts +7 -7
- package/dist/core/parser/BaseParser.d.ts +1 -1
- package/dist/core/parser/ByteStream.d.ts +1 -1
- package/dist/core/parser/PDFObjectParser.d.ts +14 -14
- package/dist/core/parser/PDFObjectStreamParser.d.ts +2 -2
- package/dist/core/parser/PDFParser.d.ts +3 -3
- package/dist/core/parser/PDFXRefStreamParser.d.ts +2 -2
- package/dist/core/streams/Ascii85Stream.d.ts +2 -2
- package/dist/core/streams/AsciiHexStream.d.ts +2 -2
- package/dist/core/streams/DecodeStream.d.ts +1 -1
- package/dist/core/streams/DecryptStream.d.ts +2 -2
- package/dist/core/streams/FlateStream.d.ts +2 -2
- package/dist/core/streams/LZWStream.d.ts +2 -2
- package/dist/core/streams/RunLengthStream.d.ts +2 -2
- package/dist/core/streams/decode.d.ts +2 -2
- package/dist/core/structures/PDFCatalog.d.ts +6 -6
- package/dist/core/structures/PDFContentStream.d.ts +4 -4
- package/dist/core/structures/PDFCrossRefStream.d.ts +4 -4
- package/dist/core/structures/PDFFlateStream.d.ts +3 -3
- package/dist/core/structures/PDFObjectStream.d.ts +4 -4
- package/dist/core/structures/PDFPageLeaf.d.ts +9 -9
- package/dist/core/structures/PDFPageTree.d.ts +6 -6
- package/dist/core/syntax/Keywords.d.ts +1 -1
- package/dist/core/writers/PDFStreamWriter.d.ts +6 -6
- package/dist/core/writers/PDFWriter.d.ts +8 -8
- package/dist/index.d.ts +4 -4
- package/dist/index.js +120 -87
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +9 -9
- package/dist/utils/elements/Arc.d.ts +4 -4
- package/dist/utils/elements/Circle.d.ts +2 -2
- package/dist/utils/elements/Ellipse.d.ts +4 -4
- package/dist/utils/elements/GraphElement.d.ts +1 -1
- package/dist/utils/elements/Line.d.ts +3 -3
- package/dist/utils/elements/Plot.d.ts +3 -3
- package/dist/utils/elements/Point.d.ts +2 -2
- package/dist/utils/elements/Rectangle.d.ts +2 -2
- package/dist/utils/elements/Segment.d.ts +4 -4
- package/dist/utils/elements/index.d.ts +9 -9
- package/dist/utils/index.d.ts +11 -11
- package/dist/utils/intersections.d.ts +3 -3
- package/dist/utils/maths.d.ts +2 -2
- package/package.json +10 -8
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import PDFEmbeddedPage from './PDFEmbeddedPage';
|
|
2
|
-
import PDFFont from './PDFFont';
|
|
3
|
-
import PDFImage from './PDFImage';
|
|
4
|
-
import PDFPage from './PDFPage';
|
|
5
|
-
import PDFForm from './form/PDFForm';
|
|
6
|
-
import { StandardFonts } from './StandardFonts';
|
|
7
|
-
import { PageBoundingBox, PDFCatalog, PDFContext } from '../core';
|
|
8
|
-
import { AttachmentOptions, SaveOptions, Base64SaveOptions, LoadOptions, CreateOptions, EmbedFontOptions, SetTitleOptions } from './PDFDocumentOptions';
|
|
9
|
-
import PDFRef from '../core/objects/PDFRef';
|
|
10
|
-
import { Fontkit } from '../types/fontkit';
|
|
11
|
-
import { TransformationMatrix } from '../types/matrix';
|
|
1
|
+
import PDFEmbeddedPage from './PDFEmbeddedPage.js';
|
|
2
|
+
import PDFFont from './PDFFont.js';
|
|
3
|
+
import PDFImage from './PDFImage.js';
|
|
4
|
+
import PDFPage from './PDFPage.js';
|
|
5
|
+
import PDFForm from './form/PDFForm.js';
|
|
6
|
+
import { StandardFonts } from './StandardFonts.js';
|
|
7
|
+
import { PageBoundingBox, PDFCatalog, PDFContext } from '../core/index.js';
|
|
8
|
+
import { AttachmentOptions, SaveOptions, Base64SaveOptions, LoadOptions, CreateOptions, EmbedFontOptions, SetTitleOptions } from './PDFDocumentOptions.js';
|
|
9
|
+
import PDFRef from '../core/objects/PDFRef.js';
|
|
10
|
+
import { Fontkit } from '../types/fontkit.js';
|
|
11
|
+
import { TransformationMatrix } from '../types/matrix.js';
|
|
12
12
|
/**
|
|
13
13
|
* Represents a PDF document.
|
|
14
14
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EmbeddedFileOptions } from '../core/embedders/FileEmbedder';
|
|
2
|
-
import { TypeFeatures } from '../types/fontkit';
|
|
1
|
+
import { EmbeddedFileOptions } from '../core/embedders/FileEmbedder.js';
|
|
2
|
+
import { TypeFeatures } from '../types/fontkit.js';
|
|
3
3
|
export declare enum ParseSpeeds {
|
|
4
4
|
Fastest = Infinity,
|
|
5
5
|
Fast = 1500,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Embeddable from './Embeddable';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import FileEmbedder from '../core/embedders/FileEmbedder';
|
|
4
|
-
import { PDFRef } from '../core';
|
|
1
|
+
import Embeddable from './Embeddable.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import FileEmbedder from '../core/embedders/FileEmbedder.js';
|
|
4
|
+
import { PDFRef } from '../core/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Represents a file that has been embedded in a [[PDFDocument]].
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Embeddable from './Embeddable';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import { PDFPageEmbedder, PDFRef } from '../core';
|
|
1
|
+
import Embeddable from './Embeddable.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import { PDFPageEmbedder, PDFRef } from '../core/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a PDF page that has been embedded in a [[PDFDocument]].
|
|
6
6
|
*/
|
package/dist/api/PDFFont.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Embeddable from './Embeddable';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import { CustomFontEmbedder, PDFHexString, PDFRef, StandardFontEmbedder } from '../core';
|
|
1
|
+
import Embeddable from './Embeddable.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import { CustomFontEmbedder, PDFHexString, PDFRef, StandardFontEmbedder } from '../core/index.js';
|
|
4
4
|
export type FontEmbedder = CustomFontEmbedder | StandardFontEmbedder;
|
|
5
5
|
/**
|
|
6
6
|
* Represents a font that has been embedded in a [[PDFDocument]].
|
package/dist/api/PDFImage.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Embeddable from './Embeddable';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import { JpegEmbedder, PDFRef, PngEmbedder } from '../core';
|
|
1
|
+
import Embeddable from './Embeddable.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import { JpegEmbedder, PDFRef, PngEmbedder } from '../core/index.js';
|
|
4
4
|
export type ImageEmbedder = JpegEmbedder | PngEmbedder;
|
|
5
5
|
/**
|
|
6
6
|
* Represents an image that has been embedded in a [[PDFDocument]].
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import Embeddable from './Embeddable';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import JavaScriptEmbedder from '../core/embedders/JavaScriptEmbedder';
|
|
4
|
-
import { PDFRef } from '../core';
|
|
1
|
+
import Embeddable from './Embeddable.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import JavaScriptEmbedder from '../core/embedders/JavaScriptEmbedder.js';
|
|
4
|
+
import { PDFRef } from '../core/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Represents JavaScript that has been embedded in a [[PDFDocument]].
|
|
7
7
|
*/
|
package/dist/api/PDFPage.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Color } from './colors';
|
|
2
|
-
import PDFDocument from './PDFDocument';
|
|
3
|
-
import PDFEmbeddedPage from './PDFEmbeddedPage';
|
|
4
|
-
import PDFFont from './PDFFont';
|
|
5
|
-
import PDFImage from './PDFImage';
|
|
6
|
-
import { PDFPageDrawCircleOptions, PDFPageDrawEllipseOptions, PDFPageDrawImageOptions, PDFPageDrawLineOptions, PDFPageDrawPageOptions, PDFPageDrawRectangleOptions, PDFPageDrawSquareOptions, PDFPageDrawSVGOptions, PDFPageDrawTextOptions, PDFPageDrawSVGElementOptions } from './PDFPageOptions';
|
|
7
|
-
import { Rotation } from './rotations';
|
|
8
|
-
import { PDFName, PDFOperator, PDFPageLeaf, PDFRef } from '../core';
|
|
1
|
+
import { Color } from './colors.js';
|
|
2
|
+
import PDFDocument from './PDFDocument.js';
|
|
3
|
+
import PDFEmbeddedPage from './PDFEmbeddedPage.js';
|
|
4
|
+
import PDFFont from './PDFFont.js';
|
|
5
|
+
import PDFImage from './PDFImage.js';
|
|
6
|
+
import { PDFPageDrawCircleOptions, PDFPageDrawEllipseOptions, PDFPageDrawImageOptions, PDFPageDrawLineOptions, PDFPageDrawPageOptions, PDFPageDrawRectangleOptions, PDFPageDrawSquareOptions, PDFPageDrawSVGOptions, PDFPageDrawTextOptions, PDFPageDrawSVGElementOptions } from './PDFPageOptions.js';
|
|
7
|
+
import { Rotation } from './rotations.js';
|
|
8
|
+
import { PDFName, PDFOperator, PDFPageLeaf, PDFRef } from '../core/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Represents a single page of a [[PDFDocument]].
|
|
11
11
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Color } from './colors';
|
|
2
|
-
import PDFFont from './PDFFont';
|
|
3
|
-
import { Rotation } from './rotations';
|
|
4
|
-
import { FillRule, LineCapStyle } from './operators';
|
|
5
|
-
import type { Space, TransformationMatrix } from '../types';
|
|
1
|
+
import { Color } from './colors.js';
|
|
2
|
+
import PDFFont from './PDFFont.js';
|
|
3
|
+
import { Rotation } from './rotations.js';
|
|
4
|
+
import { FillRule, LineCapStyle } from './operators.js';
|
|
5
|
+
import type { Space, TransformationMatrix } from '../types/index.js';
|
|
6
6
|
interface SvgOptions {
|
|
7
7
|
matrix?: TransformationMatrix;
|
|
8
8
|
clipSpaces?: Space[];
|
package/dist/api/colors.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare const colorString: (color: string) => {
|
|
|
28
28
|
rgb: Color;
|
|
29
29
|
alpha?: number;
|
|
30
30
|
};
|
|
31
|
-
export declare const setFillingColor: (color: Color) => import("
|
|
32
|
-
export declare const setStrokingColor: (color: Color) => import("
|
|
33
|
-
export declare const componentsToColor: (comps?: number[], scale?: number) =>
|
|
31
|
+
export declare const setFillingColor: (color: Color) => import("../index.js").PDFOperator;
|
|
32
|
+
export declare const setStrokingColor: (color: Color) => import("../index.js").PDFOperator;
|
|
33
|
+
export declare const componentsToColor: (comps?: number[], scale?: number) => CMYK | Grayscale | RGB | undefined;
|
|
34
34
|
export declare const colorToComponents: (color: Color) => number[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import PDFFont from '../PDFFont';
|
|
4
|
-
import PDFImage from '../PDFImage';
|
|
5
|
-
import { ImageAlignment } from '../image/alignment';
|
|
6
|
-
import { AppearanceProviderFor } from './appearances';
|
|
7
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
8
|
-
import { PDFRef, PDFAcroPushButton } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import PDFFont from '../PDFFont.js';
|
|
4
|
+
import PDFImage from '../PDFImage.js';
|
|
5
|
+
import { ImageAlignment } from '../image/alignment.js';
|
|
6
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
7
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
8
|
+
import { PDFRef, PDFAcroPushButton } from '../../core/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Represents a button field of a [[PDFForm]].
|
|
11
11
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import { AppearanceProviderFor } from './appearances';
|
|
4
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
5
|
-
import { PDFRef, PDFAcroCheckBox } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
4
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
5
|
+
import { PDFRef, PDFAcroCheckBox } from '../../core/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a check box field of a [[PDFForm]].
|
|
8
8
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import PDFFont from '../PDFFont';
|
|
4
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
5
|
-
import { AppearanceProviderFor } from './appearances';
|
|
6
|
-
import { PDFRef, PDFAcroComboBox } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import PDFFont from '../PDFFont.js';
|
|
4
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
5
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
6
|
+
import { PDFRef, PDFAcroComboBox } from '../../core/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a dropdown field of a [[PDFForm]].
|
|
9
9
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFFont from '../PDFFont';
|
|
3
|
-
import { AppearanceMapping } from './appearances';
|
|
4
|
-
import { Color } from '../colors';
|
|
5
|
-
import { Rotation } from '../rotations';
|
|
6
|
-
import { PDFRef, PDFWidgetAnnotation, PDFOperator, PDFName, PDFDict, PDFAcroTerminal } from '../../core';
|
|
7
|
-
import { ImageAlignment } from '../image';
|
|
8
|
-
import PDFImage from '../PDFImage';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFFont from '../PDFFont.js';
|
|
3
|
+
import { AppearanceMapping } from './appearances.js';
|
|
4
|
+
import { Color } from '../colors.js';
|
|
5
|
+
import { Rotation } from '../rotations.js';
|
|
6
|
+
import { PDFRef, PDFWidgetAnnotation, PDFOperator, PDFName, PDFDict, PDFAcroTerminal } from '../../core/index.js';
|
|
7
|
+
import { ImageAlignment } from '../image/index.js';
|
|
8
|
+
import PDFImage from '../PDFImage.js';
|
|
9
9
|
export interface FieldAppearanceOptions {
|
|
10
10
|
x?: number;
|
|
11
11
|
y?: number;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFField from './PDFField';
|
|
3
|
-
import PDFButton from './PDFButton';
|
|
4
|
-
import PDFCheckBox from './PDFCheckBox';
|
|
5
|
-
import PDFDropdown from './PDFDropdown';
|
|
6
|
-
import PDFOptionList from './PDFOptionList';
|
|
7
|
-
import PDFRadioGroup from './PDFRadioGroup';
|
|
8
|
-
import PDFSignature from './PDFSignature';
|
|
9
|
-
import PDFTextField from './PDFTextField';
|
|
10
|
-
import PDFFont from '../PDFFont';
|
|
11
|
-
import { PDFAcroForm, PDFRef } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFField from './PDFField.js';
|
|
3
|
+
import PDFButton from './PDFButton.js';
|
|
4
|
+
import PDFCheckBox from './PDFCheckBox.js';
|
|
5
|
+
import PDFDropdown from './PDFDropdown.js';
|
|
6
|
+
import PDFOptionList from './PDFOptionList.js';
|
|
7
|
+
import PDFRadioGroup from './PDFRadioGroup.js';
|
|
8
|
+
import PDFSignature from './PDFSignature.js';
|
|
9
|
+
import PDFTextField from './PDFTextField.js';
|
|
10
|
+
import PDFFont from '../PDFFont.js';
|
|
11
|
+
import { PDFAcroForm, PDFRef } from '../../core/index.js';
|
|
12
12
|
export interface FlattenOptions {
|
|
13
13
|
updateFieldAppearances: boolean;
|
|
14
14
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import PDFFont from '../PDFFont';
|
|
4
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
5
|
-
import { AppearanceProviderFor } from './appearances';
|
|
6
|
-
import { PDFRef, PDFAcroListBox } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import PDFFont from '../PDFFont.js';
|
|
4
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
5
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
6
|
+
import { PDFRef, PDFAcroListBox } from '../../core/index.js';
|
|
7
7
|
/**
|
|
8
8
|
* Represents an option list field of a [[PDFForm]].
|
|
9
9
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
4
|
-
import { AppearanceProviderFor } from './appearances';
|
|
5
|
-
import { PDFRef, PDFAcroRadioButton } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
4
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
5
|
+
import { PDFRef, PDFAcroRadioButton } from '../../core/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a radio group field of a [[PDFForm]].
|
|
8
8
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFField from './PDFField';
|
|
3
|
-
import { PDFRef, PDFAcroSignature } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFField from './PDFField.js';
|
|
3
|
+
import { PDFRef, PDFAcroSignature } from '../../core/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a signature field of a [[PDFForm]].
|
|
6
6
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import PDFDocument from '../PDFDocument';
|
|
2
|
-
import PDFPage from '../PDFPage';
|
|
3
|
-
import PDFFont from '../PDFFont';
|
|
4
|
-
import PDFImage from '../PDFImage';
|
|
5
|
-
import PDFField, { FieldAppearanceOptions } from './PDFField';
|
|
6
|
-
import { AppearanceProviderFor } from './appearances';
|
|
7
|
-
import { TextAlignment } from '../text/alignment';
|
|
8
|
-
import { PDFRef, PDFAcroText } from '../../core';
|
|
1
|
+
import PDFDocument from '../PDFDocument.js';
|
|
2
|
+
import PDFPage from '../PDFPage.js';
|
|
3
|
+
import PDFFont from '../PDFFont.js';
|
|
4
|
+
import PDFImage from '../PDFImage.js';
|
|
5
|
+
import PDFField, { FieldAppearanceOptions } from './PDFField.js';
|
|
6
|
+
import { AppearanceProviderFor } from './appearances.js';
|
|
7
|
+
import { TextAlignment } from '../text/alignment.js';
|
|
8
|
+
import { PDFRef, PDFAcroText } from '../../core/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Represents a text field of a [[PDFForm]].
|
|
11
11
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PDFOperator, PDFWidgetAnnotation } from '../../core';
|
|
2
|
-
import PDFFont from '../PDFFont';
|
|
3
|
-
import PDFButton from '../form/PDFButton';
|
|
4
|
-
import PDFCheckBox from '../form/PDFCheckBox';
|
|
5
|
-
import PDFDropdown from '../form/PDFDropdown';
|
|
6
|
-
import PDFField from '../form/PDFField';
|
|
7
|
-
import PDFOptionList from '../form/PDFOptionList';
|
|
8
|
-
import PDFRadioGroup from '../form/PDFRadioGroup';
|
|
9
|
-
import PDFSignature from '../form/PDFSignature';
|
|
10
|
-
import PDFTextField from '../form/PDFTextField';
|
|
1
|
+
import { PDFOperator, PDFWidgetAnnotation } from '../../core/index.js';
|
|
2
|
+
import PDFFont from '../PDFFont.js';
|
|
3
|
+
import PDFButton from '../form/PDFButton.js';
|
|
4
|
+
import PDFCheckBox from '../form/PDFCheckBox.js';
|
|
5
|
+
import PDFDropdown from '../form/PDFDropdown.js';
|
|
6
|
+
import PDFField from '../form/PDFField.js';
|
|
7
|
+
import PDFOptionList from '../form/PDFOptionList.js';
|
|
8
|
+
import PDFRadioGroup from '../form/PDFRadioGroup.js';
|
|
9
|
+
import PDFSignature from '../form/PDFSignature.js';
|
|
10
|
+
import PDFTextField from '../form/PDFTextField.js';
|
|
11
11
|
/*********************** Appearance Provider Types ****************************/
|
|
12
12
|
type CheckBoxAppearanceProvider = (checkBox: PDFCheckBox, widget: PDFWidgetAnnotation) => AppearanceOrMapping<{
|
|
13
13
|
on: PDFOperator[];
|
package/dist/api/form/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './appearances';
|
|
2
|
-
export { default as PDFButton } from './PDFButton';
|
|
3
|
-
export { default as PDFCheckBox } from './PDFCheckBox';
|
|
4
|
-
export { default as PDFDropdown } from './PDFDropdown';
|
|
5
|
-
export { default as PDFField } from './PDFField';
|
|
6
|
-
export { default as PDFForm } from './PDFForm';
|
|
7
|
-
export { default as PDFOptionList } from './PDFOptionList';
|
|
8
|
-
export { default as PDFRadioGroup } from './PDFRadioGroup';
|
|
9
|
-
export { default as PDFSignature } from './PDFSignature';
|
|
10
|
-
export { default as PDFTextField } from './PDFTextField';
|
|
1
|
+
export * from './appearances.js';
|
|
2
|
+
export { default as PDFButton } from './PDFButton.js';
|
|
3
|
+
export { default as PDFCheckBox } from './PDFCheckBox.js';
|
|
4
|
+
export { default as PDFDropdown } from './PDFDropdown.js';
|
|
5
|
+
export { default as PDFField } from './PDFField.js';
|
|
6
|
+
export { default as PDFForm } from './PDFForm.js';
|
|
7
|
+
export { default as PDFOptionList } from './PDFOptionList.js';
|
|
8
|
+
export { default as PDFRadioGroup } from './PDFRadioGroup.js';
|
|
9
|
+
export { default as PDFSignature } from './PDFSignature.js';
|
|
10
|
+
export { default as PDFTextField } from './PDFTextField.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './alignment';
|
|
1
|
+
export * from './alignment.js';
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export * from './form';
|
|
2
|
-
export * from './text';
|
|
3
|
-
export * from './colors';
|
|
4
|
-
export * from './errors';
|
|
5
|
-
export * from './image';
|
|
6
|
-
export * from './objects';
|
|
7
|
-
export * from './operations';
|
|
8
|
-
export * from './operators';
|
|
9
|
-
export * from './rotations';
|
|
10
|
-
export * from './sizes';
|
|
11
|
-
export * from './PDFPageOptions';
|
|
12
|
-
export * from './PDFDocumentOptions';
|
|
13
|
-
export * from './StandardFonts';
|
|
14
|
-
export { default as PDFDocument } from './PDFDocument';
|
|
15
|
-
export { default as PDFFont } from './PDFFont';
|
|
16
|
-
export { default as PDFImage } from './PDFImage';
|
|
17
|
-
export { default as PDFPage } from './PDFPage';
|
|
18
|
-
export { default as PDFEmbeddedPage } from './PDFEmbeddedPage';
|
|
19
|
-
export { default as PDFJavaScript } from './PDFJavaScript';
|
|
20
|
-
export type { default as Embeddable } from './Embeddable';
|
|
1
|
+
export * from './form/index.js';
|
|
2
|
+
export * from './text/index.js';
|
|
3
|
+
export * from './colors.js';
|
|
4
|
+
export * from './errors.js';
|
|
5
|
+
export * from './image/index.js';
|
|
6
|
+
export * from './objects.js';
|
|
7
|
+
export * from './operations.js';
|
|
8
|
+
export * from './operators.js';
|
|
9
|
+
export * from './rotations.js';
|
|
10
|
+
export * from './sizes.js';
|
|
11
|
+
export * from './PDFPageOptions.js';
|
|
12
|
+
export * from './PDFDocumentOptions.js';
|
|
13
|
+
export * from './StandardFonts.js';
|
|
14
|
+
export { default as PDFDocument } from './PDFDocument.js';
|
|
15
|
+
export { default as PDFFont } from './PDFFont.js';
|
|
16
|
+
export { default as PDFImage } from './PDFImage.js';
|
|
17
|
+
export { default as PDFPage } from './PDFPage.js';
|
|
18
|
+
export { default as PDFEmbeddedPage } from './PDFEmbeddedPage.js';
|
|
19
|
+
export { default as PDFJavaScript } from './PDFJavaScript.js';
|
|
20
|
+
export type { default as Embeddable } from './Embeddable.js';
|
package/dist/api/objects.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PDFName, PDFNumber } from '../core';
|
|
1
|
+
import { PDFName, PDFNumber } from '../core/index.js';
|
|
2
2
|
export declare const asPDFName: (name: string | PDFName) => PDFName;
|
|
3
3
|
export declare const asPDFNumber: (num: number | PDFNumber) => PDFNumber;
|
|
4
4
|
export declare const asNumber: (num: number | PDFNumber) => number;
|
package/dist/api/operations.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Color } from './colors';
|
|
2
|
-
import { LineCapStyle, FillRule } from './operators';
|
|
3
|
-
import { Rotation } from './rotations';
|
|
4
|
-
import { PDFHexString, PDFName, PDFNumber, PDFOperator } from '../core';
|
|
5
|
-
import type { Space, TransformationMatrix } from '../types';
|
|
1
|
+
import { Color } from './colors.js';
|
|
2
|
+
import { LineCapStyle, FillRule } from './operators.js';
|
|
3
|
+
import { Rotation } from './rotations.js';
|
|
4
|
+
import { PDFHexString, PDFName, PDFNumber, PDFOperator } from '../core/index.js';
|
|
5
|
+
import type { Space, TransformationMatrix } from '../types/index.js';
|
|
6
6
|
export interface DrawTextOptions {
|
|
7
7
|
color: Color;
|
|
8
8
|
font: string | PDFName;
|
package/dist/api/operators.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PDFHexString, PDFName, PDFNumber, PDFOperator } from '../core';
|
|
1
|
+
import { PDFHexString, PDFName, PDFNumber, PDFOperator } from '../core/index.js';
|
|
2
2
|
export declare const clip: () => PDFOperator;
|
|
3
3
|
export declare const clipEvenOdd: () => PDFOperator;
|
|
4
4
|
export declare const concatTransformationMatrix: (a: number | PDFNumber, b: number | PDFNumber, c: number | PDFNumber, d: number | PDFNumber, e: number | PDFNumber, f: number | PDFNumber) => PDFOperator;
|
package/dist/api/svg.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HTMLElement } from 'node-html-better-parser';
|
|
2
|
-
import { Color } from './colors';
|
|
3
|
-
import { Degrees } from './rotations';
|
|
4
|
-
import PDFPage from './PDFPage';
|
|
5
|
-
import { PDFPageDrawSVGElementOptions } from './PDFPageOptions';
|
|
6
|
-
import { LineCapStyle, LineJoinStyle, FillRule } from './operators';
|
|
7
|
-
import { TransformationMatrix } from '../types/matrix';
|
|
8
|
-
import { Space } from '../types';
|
|
2
|
+
import { Color } from './colors.js';
|
|
3
|
+
import { Degrees } from './rotations.js';
|
|
4
|
+
import PDFPage from './PDFPage.js';
|
|
5
|
+
import { PDFPageDrawSVGElementOptions } from './PDFPageOptions.js';
|
|
6
|
+
import { LineCapStyle, LineJoinStyle, FillRule } from './operators.js';
|
|
7
|
+
import { TransformationMatrix } from '../types/matrix.js';
|
|
8
|
+
import { Space } from '../types/index.js';
|
|
9
9
|
interface Position {
|
|
10
10
|
x: number;
|
|
11
11
|
y: number;
|
package/dist/api/svgPath.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PDFOperator } from '../core';
|
|
1
|
+
import { PDFOperator } from '../core/index.js';
|
|
2
2
|
export declare const svgPathToOperators: (path: string) => PDFOperator[];
|
package/dist/api/text/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './alignment';
|
|
2
|
-
export * from './layout';
|
|
1
|
+
export * from './alignment.js';
|
|
2
|
+
export * from './layout.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import PDFFont from '../PDFFont';
|
|
2
|
-
import { TextAlignment } from './alignment';
|
|
3
|
-
import { PDFHexString } from '../../core';
|
|
1
|
+
import PDFFont from '../PDFFont.js';
|
|
2
|
+
import { TextAlignment } from './alignment.js';
|
|
3
|
+
import { PDFHexString } from '../../core/index.js';
|
|
4
4
|
export interface TextPosition {
|
|
5
5
|
text: string;
|
|
6
6
|
encoded: PDFHexString;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import PDFHeader from './document/PDFHeader';
|
|
2
|
-
import PDFArray from './objects/PDFArray';
|
|
3
|
-
import PDFBool from './objects/PDFBool';
|
|
4
|
-
import PDFDict from './objects/PDFDict';
|
|
5
|
-
import PDFHexString from './objects/PDFHexString';
|
|
6
|
-
import PDFName from './objects/PDFName';
|
|
7
|
-
import PDFNull from './objects/PDFNull';
|
|
8
|
-
import PDFNumber from './objects/PDFNumber';
|
|
9
|
-
import PDFObject from './objects/PDFObject';
|
|
10
|
-
import PDFRawStream from './objects/PDFRawStream';
|
|
11
|
-
import PDFRef from './objects/PDFRef';
|
|
12
|
-
import PDFStream from './objects/PDFStream';
|
|
13
|
-
import PDFString from './objects/PDFString';
|
|
14
|
-
import PDFOperator from './operators/PDFOperator';
|
|
15
|
-
import PDFContentStream from './structures/PDFContentStream';
|
|
16
|
-
import { SimpleRNG } from '../utils/rng';
|
|
1
|
+
import PDFHeader from './document/PDFHeader.js';
|
|
2
|
+
import PDFArray from './objects/PDFArray.js';
|
|
3
|
+
import PDFBool from './objects/PDFBool.js';
|
|
4
|
+
import PDFDict from './objects/PDFDict.js';
|
|
5
|
+
import PDFHexString from './objects/PDFHexString.js';
|
|
6
|
+
import PDFName from './objects/PDFName.js';
|
|
7
|
+
import PDFNull from './objects/PDFNull.js';
|
|
8
|
+
import PDFNumber from './objects/PDFNumber.js';
|
|
9
|
+
import PDFObject from './objects/PDFObject.js';
|
|
10
|
+
import PDFRawStream from './objects/PDFRawStream.js';
|
|
11
|
+
import PDFRef from './objects/PDFRef.js';
|
|
12
|
+
import PDFStream from './objects/PDFStream.js';
|
|
13
|
+
import PDFString from './objects/PDFString.js';
|
|
14
|
+
import PDFOperator from './operators/PDFOperator.js';
|
|
15
|
+
import PDFContentStream from './structures/PDFContentStream.js';
|
|
16
|
+
import { SimpleRNG } from '../utils/rng.js';
|
|
17
17
|
type LookupKey = PDFRef | PDFObject | undefined;
|
|
18
18
|
interface LiteralObject {
|
|
19
19
|
[name: string]: Literal | PDFObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PDFObject from './objects/PDFObject';
|
|
2
|
-
import PDFContext from './PDFContext';
|
|
1
|
+
import PDFObject from './objects/PDFObject.js';
|
|
2
|
+
import PDFContext from './PDFContext.js';
|
|
3
3
|
/**
|
|
4
4
|
* PDFObjectCopier copies PDFObjects from a src context to a dest context.
|
|
5
5
|
* The primary use case for this is to copy pages between PDFs.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import PDFObject from '../objects/PDFObject';
|
|
2
|
-
import PDFString from '../objects/PDFString';
|
|
3
|
-
import PDFHexString from '../objects/PDFHexString';
|
|
4
|
-
import PDFArray from '../objects/PDFArray';
|
|
5
|
-
import PDFName from '../objects/PDFName';
|
|
6
|
-
import PDFRef from '../objects/PDFRef';
|
|
7
|
-
import PDFAcroTerminal from './PDFAcroTerminal';
|
|
1
|
+
import PDFObject from '../objects/PDFObject.js';
|
|
2
|
+
import PDFString from '../objects/PDFString.js';
|
|
3
|
+
import PDFHexString from '../objects/PDFHexString.js';
|
|
4
|
+
import PDFArray from '../objects/PDFArray.js';
|
|
5
|
+
import PDFName from '../objects/PDFName.js';
|
|
6
|
+
import PDFRef from '../objects/PDFRef.js';
|
|
7
|
+
import PDFAcroTerminal from './PDFAcroTerminal.js';
|
|
8
8
|
declare class PDFAcroButton extends PDFAcroTerminal {
|
|
9
9
|
Opt(): PDFString | PDFHexString | PDFArray | undefined;
|
|
10
10
|
setOpt(opt: PDFObject[]): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import PDFContext from '../PDFContext';
|
|
2
|
-
import PDFRef from '../objects/PDFRef';
|
|
3
|
-
import PDFDict from '../objects/PDFDict';
|
|
4
|
-
import PDFName from '../objects/PDFName';
|
|
5
|
-
import PDFAcroButton from './PDFAcroButton';
|
|
1
|
+
import PDFContext from '../PDFContext.js';
|
|
2
|
+
import PDFRef from '../objects/PDFRef.js';
|
|
3
|
+
import PDFDict from '../objects/PDFDict.js';
|
|
4
|
+
import PDFName from '../objects/PDFName.js';
|
|
5
|
+
import PDFAcroButton from './PDFAcroButton.js';
|
|
6
6
|
declare class PDFAcroCheckBox extends PDFAcroButton {
|
|
7
7
|
static fromDict: (dict: PDFDict, ref: PDFRef) => PDFAcroCheckBox;
|
|
8
8
|
static create: (context: PDFContext) => PDFAcroCheckBox;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import PDFAcroTerminal from './PDFAcroTerminal';
|
|
2
|
-
import PDFHexString from '../objects/PDFHexString';
|
|
3
|
-
import PDFString from '../objects/PDFString';
|
|
4
|
-
import PDFArray from '../objects/PDFArray';
|
|
1
|
+
import PDFAcroTerminal from './PDFAcroTerminal.js';
|
|
2
|
+
import PDFHexString from '../objects/PDFHexString.js';
|
|
3
|
+
import PDFString from '../objects/PDFString.js';
|
|
4
|
+
import PDFArray from '../objects/PDFArray.js';
|
|
5
5
|
declare class PDFAcroChoice extends PDFAcroTerminal {
|
|
6
6
|
setValues(values: (PDFString | PDFHexString)[]): void;
|
|
7
7
|
valuesAreValid(values: (PDFString | PDFHexString)[]): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import PDFDict from '../objects/PDFDict';
|
|
2
|
-
import PDFAcroChoice from './PDFAcroChoice';
|
|
3
|
-
import PDFContext from '../PDFContext';
|
|
4
|
-
import PDFRef from '../objects/PDFRef';
|
|
1
|
+
import PDFDict from '../objects/PDFDict.js';
|
|
2
|
+
import PDFAcroChoice from './PDFAcroChoice.js';
|
|
3
|
+
import PDFContext from '../PDFContext.js';
|
|
4
|
+
import PDFRef from '../objects/PDFRef.js';
|
|
5
5
|
declare class PDFAcroComboBox extends PDFAcroChoice {
|
|
6
6
|
static fromDict: (dict: PDFDict, ref: PDFRef) => PDFAcroComboBox;
|
|
7
7
|
static create: (context: PDFContext) => PDFAcroComboBox;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import PDFDict from '../objects/PDFDict';
|
|
2
|
-
import PDFString from '../objects/PDFString';
|
|
3
|
-
import PDFHexString from '../objects/PDFHexString';
|
|
4
|
-
import PDFName from '../objects/PDFName';
|
|
5
|
-
import PDFObject from '../objects/PDFObject';
|
|
6
|
-
import PDFNumber from '../objects/PDFNumber';
|
|
7
|
-
import PDFArray from '../objects/PDFArray';
|
|
8
|
-
import PDFRef from '../objects/PDFRef';
|
|
1
|
+
import PDFDict from '../objects/PDFDict.js';
|
|
2
|
+
import PDFString from '../objects/PDFString.js';
|
|
3
|
+
import PDFHexString from '../objects/PDFHexString.js';
|
|
4
|
+
import PDFName from '../objects/PDFName.js';
|
|
5
|
+
import PDFObject from '../objects/PDFObject.js';
|
|
6
|
+
import PDFNumber from '../objects/PDFNumber.js';
|
|
7
|
+
import PDFArray from '../objects/PDFArray.js';
|
|
8
|
+
import PDFRef from '../objects/PDFRef.js';
|
|
9
9
|
declare class PDFAcroField {
|
|
10
10
|
readonly dict: PDFDict;
|
|
11
11
|
readonly ref: PDFRef;
|