@pdfme/pdf-lib 6.1.12-dev.11 → 6.1.12-dev.7
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/colors.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/api/colors.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export declare const colorString: (color: string) => {
|
|
|
30
30
|
};
|
|
31
31
|
export declare const setFillingColor: (color: Color) => import("..").PDFOperator;
|
|
32
32
|
export declare const setStrokingColor: (color: Color) => import("..").PDFOperator;
|
|
33
|
-
export declare const componentsToColor: (comps?: number[], scale?: number) =>
|
|
33
|
+
export declare const componentsToColor: (comps?: number[], scale?: number) => Grayscale | RGB | CMYK | undefined;
|
|
34
34
|
export declare const colorToComponents: (color: Color) => number[];
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Encodings, Font, FontNames } from "@pdf-lib/standard-fonts";
|
|
2
|
-
import
|
|
2
|
+
import pako from "pako";
|
|
3
3
|
import UPNGModule from "@pdf-lib/upng";
|
|
4
4
|
import ColorParser from "color";
|
|
5
5
|
import { NodeType, parse } from "node-html-better-parser";
|
|
@@ -1863,7 +1863,7 @@ var PDFFlateStream = class extends PDFStream {
|
|
|
1863
1863
|
_defineProperty(this, "encode", void 0);
|
|
1864
1864
|
_defineProperty(this, "computeContents", () => {
|
|
1865
1865
|
const unencodedContents = this.getUnencodedContents();
|
|
1866
|
-
return this.encode ? deflate(unencodedContents) : unencodedContents;
|
|
1866
|
+
return this.encode ? pako.deflate(unencodedContents) : unencodedContents;
|
|
1867
1867
|
});
|
|
1868
1868
|
this.encode = encode;
|
|
1869
1869
|
if (encode) dict.set(PDFName.of("Filter"), PDFName.of("FlateDecode"));
|
|
@@ -2035,7 +2035,7 @@ var PDFContext = class {
|
|
|
2035
2035
|
return PDFRawStream.of(this.obj(dict), typedArrayFor(contents));
|
|
2036
2036
|
}
|
|
2037
2037
|
flateStream(contents, dict = {}) {
|
|
2038
|
-
return this.stream(deflate(typedArrayFor(contents)), {
|
|
2038
|
+
return this.stream(pako.deflate(typedArrayFor(contents)), {
|
|
2039
2039
|
...dict,
|
|
2040
2040
|
Filter: "FlateDecode"
|
|
2041
2041
|
});
|