@pdfme/pdf-lib 6.1.12 → 6.1.13-dev.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/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
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import Arc from '../utils/elements/Arc';
|
|
2
|
-
import Circle from '../utils/elements/Circle';
|
|
3
|
-
import Ellipse from '../utils/elements/Ellipse';
|
|
4
|
-
import Line from '../utils/elements/Line';
|
|
5
|
-
import Plot from '../utils/elements/Plot';
|
|
6
|
-
import Point from '../utils/elements/Point';
|
|
7
|
-
import Rectangle from '../utils/elements/Rectangle';
|
|
8
|
-
import Segment from '../utils/elements/Segment';
|
|
9
|
-
export type { TransformationMatrix } from './matrix';
|
|
1
|
+
import Arc from '../utils/elements/Arc.js';
|
|
2
|
+
import Circle from '../utils/elements/Circle.js';
|
|
3
|
+
import Ellipse from '../utils/elements/Ellipse.js';
|
|
4
|
+
import Line from '../utils/elements/Line.js';
|
|
5
|
+
import Plot from '../utils/elements/Plot.js';
|
|
6
|
+
import Point from '../utils/elements/Point.js';
|
|
7
|
+
import Rectangle from '../utils/elements/Rectangle.js';
|
|
8
|
+
import Segment from '../utils/elements/Segment.js';
|
|
9
|
+
export type { TransformationMatrix } from './matrix.js';
|
|
10
10
|
export type Size = {
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Circle from './Circle';
|
|
2
|
-
import GraphElement from './GraphElement';
|
|
3
|
-
import Point from './Point';
|
|
1
|
+
import Circle from './Circle.js';
|
|
2
|
+
import GraphElement from './GraphElement.js';
|
|
3
|
+
import Point from './Point.js';
|
|
4
4
|
export default class Arc extends GraphElement {
|
|
5
5
|
O: Point;
|
|
6
6
|
A: Point;
|
|
@@ -15,7 +15,7 @@ export default class Arc extends GraphElement {
|
|
|
15
15
|
ray(): number;
|
|
16
16
|
isEqual(element: GraphElement): boolean;
|
|
17
17
|
getCircle(): Circle;
|
|
18
|
-
originVect(): import("
|
|
18
|
+
originVect(): import("../../index.js").Coordinates;
|
|
19
19
|
middle(): Point;
|
|
20
20
|
includes(P: Point): boolean;
|
|
21
21
|
orthoProjection(P: Point): Point;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Size } from '../../types';
|
|
2
|
-
import GraphElement from './GraphElement';
|
|
3
|
-
import Point from './Point';
|
|
4
|
-
import Segment from './Segment';
|
|
1
|
+
import { Size } from '../../types/index.js';
|
|
2
|
+
import GraphElement from './GraphElement.js';
|
|
3
|
+
import Point from './Point.js';
|
|
4
|
+
import Segment from './Segment.js';
|
|
5
5
|
export default class Ellipse extends GraphElement {
|
|
6
6
|
A: Point;
|
|
7
7
|
B: Point;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Coordinates } from '../../types';
|
|
2
|
-
import GraphElement from './GraphElement';
|
|
3
|
-
import Point from './Point';
|
|
1
|
+
import { Coordinates } from '../../types/index.js';
|
|
2
|
+
import GraphElement from './GraphElement.js';
|
|
3
|
+
import Point from './Point.js';
|
|
4
4
|
export default class Line extends GraphElement {
|
|
5
5
|
origin(): Point;
|
|
6
6
|
dirVect(): Coordinates;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Coordinates } from '../../types';
|
|
2
|
-
import GraphElement from './GraphElement';
|
|
3
|
-
import Point from './Point';
|
|
1
|
+
import { Coordinates } from '../../types/index.js';
|
|
2
|
+
import GraphElement from './GraphElement.js';
|
|
3
|
+
import Point from './Point.js';
|
|
4
4
|
export default class Plot extends GraphElement {
|
|
5
5
|
points: Coordinates[];
|
|
6
6
|
constructor(points?: Coordinates[]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Coordinates } from '../../types';
|
|
2
|
-
import GraphElement from './GraphElement';
|
|
1
|
+
import type { Coordinates } from '../../types/index.js';
|
|
2
|
+
import GraphElement from './GraphElement.js';
|
|
3
3
|
export default class Point extends GraphElement {
|
|
4
4
|
static type: string;
|
|
5
5
|
x: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import GraphElement from './GraphElement';
|
|
2
|
-
import Line from './Line';
|
|
3
|
-
import Point from './Point';
|
|
1
|
+
import GraphElement from './GraphElement.js';
|
|
2
|
+
import Line from './Line.js';
|
|
3
|
+
import Point from './Point.js';
|
|
4
4
|
export default class Segment extends GraphElement {
|
|
5
5
|
static type: string;
|
|
6
6
|
A: Point;
|
|
@@ -8,7 +8,7 @@ export default class Segment extends GraphElement {
|
|
|
8
8
|
constructor(A?: Point, B?: Point);
|
|
9
9
|
origin(): Point;
|
|
10
10
|
destination(): Point;
|
|
11
|
-
dirVect(): import("
|
|
11
|
+
dirVect(): import("../../index.js").Coordinates;
|
|
12
12
|
length(): number;
|
|
13
13
|
isEqual(element: GraphElement): boolean;
|
|
14
14
|
/** Returns an equivalent line object */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { default as Arc } from './Arc';
|
|
2
|
-
export { default as Circle } from './Circle';
|
|
3
|
-
export { default as GraphElement } from './GraphElement';
|
|
4
|
-
export { default as Ellipse } from './Ellipse';
|
|
5
|
-
export { default as Line } from './Line';
|
|
6
|
-
export { default as SegmePlotnt } from './Plot';
|
|
7
|
-
export { default as Point } from './Point';
|
|
8
|
-
export { default as Rectangle } from './Rectangle';
|
|
9
|
-
export { default as Segment } from './Segment';
|
|
1
|
+
export { default as Arc } from './Arc.js';
|
|
2
|
+
export { default as Circle } from './Circle.js';
|
|
3
|
+
export { default as GraphElement } from './GraphElement.js';
|
|
4
|
+
export { default as Ellipse } from './Ellipse.js';
|
|
5
|
+
export { default as Line } from './Line.js';
|
|
6
|
+
export { default as SegmePlotnt } from './Plot.js';
|
|
7
|
+
export { default as Point } from './Point.js';
|
|
8
|
+
export { default as Rectangle } from './Rectangle.js';
|
|
9
|
+
export { default as Segment } from './Segment.js';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from './arrays';
|
|
2
|
-
export * from './async';
|
|
3
|
-
export * from './strings';
|
|
4
|
-
export * from './unicode';
|
|
5
|
-
export * from './numbers';
|
|
6
|
-
export * from './errors';
|
|
7
|
-
export * from './base64';
|
|
8
|
-
export * from './objects';
|
|
9
|
-
export * from './validators';
|
|
10
|
-
export * from './pdfDocEncoding';
|
|
11
|
-
export { default as Cache } from './Cache';
|
|
1
|
+
export * from './arrays.js';
|
|
2
|
+
export * from './async.js';
|
|
3
|
+
export * from './strings.js';
|
|
4
|
+
export * from './unicode.js';
|
|
5
|
+
export * from './numbers.js';
|
|
6
|
+
export * from './errors.js';
|
|
7
|
+
export * from './base64.js';
|
|
8
|
+
export * from './objects.js';
|
|
9
|
+
export * from './validators.js';
|
|
10
|
+
export * from './pdfDocEncoding.js';
|
|
11
|
+
export { default as Cache } from './Cache.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Circle from './elements/Circle';
|
|
2
|
-
import Line from './elements/Line';
|
|
3
|
-
import { Coordinates, GraphicElement } from '../types';
|
|
1
|
+
import Circle from './elements/Circle.js';
|
|
2
|
+
import Line from './elements/Line.js';
|
|
3
|
+
import { Coordinates, GraphicElement } from '../types/index.js';
|
|
4
4
|
export declare function intersections(A: GraphicElement, B: GraphicElement): Coordinates[];
|
|
5
5
|
export declare function intersection(A: GraphicElement, B: GraphicElement): Coordinates | undefined;
|
|
6
6
|
export declare function intersectionLine(A: Line, B: Line): Coordinates[];
|
package/dist/utils/maths.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import Point from './elements/Point';
|
|
2
|
-
import { Coordinates } from '../types';
|
|
1
|
+
import Point from './elements/Point.js';
|
|
2
|
+
import { Coordinates } from '../types/index.js';
|
|
3
3
|
/** This value represents the precision we accept for float values */
|
|
4
4
|
export declare const FLOAT_APPROXIMATION = 0.000001;
|
|
5
5
|
/** Calculates the distance between 2 points */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdfme/pdf-lib",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.13-dev.4",
|
|
4
4
|
"description": "Create and modify PDF files with JavaScript",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"create",
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist",
|
|
31
|
+
"!dist/typecheck",
|
|
32
|
+
"!dist/typecheck/**",
|
|
31
33
|
"README.md",
|
|
32
34
|
"LICENSE.md"
|
|
33
35
|
],
|
|
@@ -50,20 +52,20 @@
|
|
|
50
52
|
"dev": "vite build --watch",
|
|
51
53
|
"build": "vite build && tsc -p tsconfig.build.json",
|
|
52
54
|
"clean": "rimraf --glob dist \"src/**/*.d.ts\"",
|
|
53
|
-
"lint": "vp lint -c ../../.oxlintrc.json src",
|
|
54
|
-
"fmt": "vp fmt -c ../../.oxfmtrc.json src --write",
|
|
55
|
-
"test": "vitest run --config ../../vitest.config.ts"
|
|
55
|
+
"lint": "vp lint -c ../../.oxlintrc.json src scripts",
|
|
56
|
+
"fmt": "vp fmt -c ../../.oxfmtrc.json src scripts --write",
|
|
57
|
+
"test": "vitest run --config ../../vitest.config.ts",
|
|
58
|
+
"test:types:consumer": "tsc -p tsconfig.scripts.json && node ./scripts/dist/test-types-consumer.js"
|
|
56
59
|
},
|
|
57
60
|
"dependencies": {
|
|
58
61
|
"@pdf-lib/standard-fonts": "^1.0.0",
|
|
59
62
|
"@pdf-lib/upng": "^1.0.1",
|
|
60
63
|
"color": "^5.0.3",
|
|
61
|
-
"node-html-better-parser": "^1.5.
|
|
62
|
-
"pako": "^
|
|
64
|
+
"node-html-better-parser": "^1.5.9",
|
|
65
|
+
"pako": "^3.0.1"
|
|
63
66
|
},
|
|
64
67
|
"devDependencies": {
|
|
65
68
|
"@pdf-lib/fontkit": "^1.1.0",
|
|
66
|
-
"@types/color": "^4.2.1"
|
|
67
|
-
"@types/pako": "^2.0.4"
|
|
69
|
+
"@types/color": "^4.2.1"
|
|
68
70
|
}
|
|
69
71
|
}
|