@shad0wz7/nestjs-pdf 3.1.0 → 3.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.
- package/README.md +96 -6
- package/dist/index.cjs +384 -1307
- package/dist/index.d.cts +93 -8
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +93 -8
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +390 -1338
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -8
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Browser, BrowserContext, PDFOptions } from "puppeteer";
|
|
2
|
+
import { StandardFonts } from "pdf-lib";
|
|
1
3
|
import { DynamicModule, InjectionToken, ModuleMetadata, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency } from "@nestjs/common";
|
|
2
|
-
import { Browser } from "@puppeteer/browsers";
|
|
4
|
+
import { Browser as Browser$1 } from "@puppeteer/browsers";
|
|
3
5
|
import { MJMLParsingOptions } from "mjml-core";
|
|
4
|
-
import { Browser as Browser$1, BrowserContext, PDFOptions } from "puppeteer";
|
|
5
6
|
import { Data, Options } from "ejs";
|
|
6
7
|
import { EtaConfig } from "eta";
|
|
7
8
|
import Handlebars from "handlebars";
|
|
@@ -17,7 +18,8 @@ export declare enum NestjsPdfErrorCode {
|
|
|
17
18
|
BROWSER_UNAVAILABLE = "BROWSER_UNAVAILABLE",
|
|
18
19
|
PDF_GENERATION_ERROR = "PDF_GENERATION_ERROR",
|
|
19
20
|
SIGNATURE_DEPENDENCY_ERROR = "SIGNATURE_DEPENDENCY_ERROR",
|
|
20
|
-
SIGNATURE_PLACEMENT_ERROR = "SIGNATURE_PLACEMENT_ERROR"
|
|
21
|
+
SIGNATURE_PLACEMENT_ERROR = "SIGNATURE_PLACEMENT_ERROR",
|
|
22
|
+
WATERMARK_ERROR = "WATERMARK_ERROR"
|
|
21
23
|
}
|
|
22
24
|
export declare abstract class NestjsPdfException extends Error {
|
|
23
25
|
abstract readonly code: NestjsPdfErrorCode;
|
|
@@ -71,6 +73,11 @@ export declare class TemplateRenderException extends NestjsPdfException {
|
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
75
|
//#endregion
|
|
76
|
+
//#region src/exceptions/watermark.exception.d.ts
|
|
77
|
+
export declare class WatermarkException extends NestjsPdfException {
|
|
78
|
+
readonly code = NestjsPdfErrorCode.WATERMARK_ERROR;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
74
81
|
//#region src/helpers/getRelativePath.helper.d.ts
|
|
75
82
|
/**
|
|
76
83
|
* Get the relative path to a value from the module directory.
|
|
@@ -83,6 +90,57 @@ export declare class TemplateRenderException extends NestjsPdfException {
|
|
|
83
90
|
*/
|
|
84
91
|
export declare function getRelativePathToValue(moduleDir: string, relativeToModule: string): string;
|
|
85
92
|
//#endregion
|
|
93
|
+
//#region src/helpers/request-guard.helper.d.ts
|
|
94
|
+
/**
|
|
95
|
+
* Filters what the rendered HTML may load (SSRF protection). Disabled unless set:
|
|
96
|
+
* pass `{}` for the defaults (private networks and `file:` blocked).
|
|
97
|
+
*/
|
|
98
|
+
interface PdfSecurityOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Refuse http(s) requests that resolve to a loopback, private, link-local
|
|
101
|
+
* (cloud metadata included) or otherwise non-public address. Default: true
|
|
102
|
+
*/
|
|
103
|
+
blockPrivateNetworks?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* When set, http(s) requests are only allowed to these hosts (`example.com`
|
|
106
|
+
* or `*.example.com`). Listed hosts are trusted, even on a private address.
|
|
107
|
+
*/
|
|
108
|
+
allowedHosts?: Array<string>;
|
|
109
|
+
/**
|
|
110
|
+
* `file:` requests are refused unless the file is inside one of these
|
|
111
|
+
* directories (symbolic links are resolved).
|
|
112
|
+
*/
|
|
113
|
+
allowedFileRoots?: Array<string>;
|
|
114
|
+
/** Set to false to disable JavaScript in the rendered page. Default: true */
|
|
115
|
+
javascriptEnabled?: boolean;
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/helpers/watermark.helper.d.ts
|
|
119
|
+
interface WatermarkOptions {
|
|
120
|
+
/** Text to stamp. At least one of `text` or `image` is required. */
|
|
121
|
+
text?: string;
|
|
122
|
+
/** PNG or JPEG bytes to stamp. At least one of `text` or `image` is required. */
|
|
123
|
+
image?: Uint8Array | Buffer;
|
|
124
|
+
/** Opacity between 0 (invisible) and 1 (opaque). Default: 0.15 */
|
|
125
|
+
opacity?: number;
|
|
126
|
+
/** Counter-clockwise rotation in degrees. Default: 45 */
|
|
127
|
+
rotation?: number;
|
|
128
|
+
/** Text font size in points. Default: 60 */
|
|
129
|
+
fontSize?: number;
|
|
130
|
+
/** One of the PDF standard fonts (WinAnsi characters only). Default: 'HelveticaBold' */
|
|
131
|
+
font?: keyof typeof StandardFonts;
|
|
132
|
+
/** Text color as `#rgb` or `#rrggbb`. Default: '#808080' */
|
|
133
|
+
color?: string;
|
|
134
|
+
/** Rendered image width in points (aspect ratio preserved). Default: 50% of the page width */
|
|
135
|
+
imageWidth?: number;
|
|
136
|
+
/** `center` stamps once per page, `tile` repeats the mark across the page. Default: 'center' */
|
|
137
|
+
position?: 'center' | 'tile';
|
|
138
|
+
/** Gap in points between two marks when `position` is `tile`. Default: 100 */
|
|
139
|
+
tileSpacing?: number;
|
|
140
|
+
/** 1-based page numbers to watermark. Default: all pages */
|
|
141
|
+
pages?: Array<number>;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
86
144
|
//#region src/puppeteer/browser/browser.service.d.ts
|
|
87
145
|
declare enum BrowserTag {
|
|
88
146
|
LATEST = "latest",
|
|
@@ -100,19 +158,19 @@ declare class BrowserService implements OnModuleDestroy {
|
|
|
100
158
|
shutdownDrainTimeoutMs: number;
|
|
101
159
|
constructor(pdfParams: PuppeteerParameters);
|
|
102
160
|
onModuleDestroy(): Promise<void>;
|
|
103
|
-
getBrowserInstance(args: Array<string>, headless: boolean | 'shell' | undefined, executablePathBin: string | undefined): Promise<Browser
|
|
161
|
+
getBrowserInstance(args: Array<string>, headless: boolean | 'shell' | undefined, executablePathBin: string | undefined): Promise<Browser>;
|
|
104
162
|
createContext(args: Array<string>, headless: Headless, executablePath?: string): Promise<BrowserContext>;
|
|
105
163
|
markJobStarted(): void;
|
|
106
164
|
markJobFinished(): Promise<void>;
|
|
107
165
|
recycleBrowserIfNeeded(): Promise<void>;
|
|
108
166
|
install(lock?: boolean): Promise<import("@puppeteer/browsers").InstalledBrowser | null | undefined>;
|
|
109
|
-
getBrowser(): Browser;
|
|
167
|
+
getBrowser(): Browser$1;
|
|
110
168
|
setBrowserTag(browserTag: BrowserTag): void;
|
|
111
169
|
getBrowserTag(): BrowserTag;
|
|
112
170
|
getBuildId(): string | undefined;
|
|
113
|
-
hasBrowserInstalled(browser: Browser, buildId: string): Promise<boolean>;
|
|
171
|
+
hasBrowserInstalled(browser: Browser$1, buildId: string): Promise<boolean>;
|
|
114
172
|
getExecutablePath(): Promise<string>;
|
|
115
|
-
getLockedBuildId(browser: Browser): string | null;
|
|
173
|
+
getLockedBuildId(browser: Browser$1): string | null;
|
|
116
174
|
}
|
|
117
175
|
//#endregion
|
|
118
176
|
//#region src/puppeteer/engines/ejs/ejs.service.d.ts
|
|
@@ -248,6 +306,14 @@ export declare class PugService {
|
|
|
248
306
|
//#region src/puppeteer/puppeteer-parameters.interface.d.ts
|
|
249
307
|
export interface PuppeteerParameters {
|
|
250
308
|
pdfOptions?: PDFOptions;
|
|
309
|
+
/**
|
|
310
|
+
* Cancels the generation when aborted, including while it waits for a free slot.
|
|
311
|
+
* The promise rejects with `signal.reason`; use `AbortSignal.timeout(ms)` for a timeout.
|
|
312
|
+
*/
|
|
313
|
+
signal?: AbortSignal;
|
|
314
|
+
/** Watermark stamped on the generated PDF. */
|
|
315
|
+
watermark?: WatermarkOptions;
|
|
316
|
+
security?: PdfSecurityOptions;
|
|
251
317
|
hbsOptions?: HandlebarsOptions;
|
|
252
318
|
mjmlOptions?: MJMLParsingOptions;
|
|
253
319
|
pugOptions?: PugOptions;
|
|
@@ -258,7 +324,7 @@ export interface PuppeteerParameters {
|
|
|
258
324
|
chromiumRevision?: string;
|
|
259
325
|
buildId?: string;
|
|
260
326
|
headless?: boolean | 'shell';
|
|
261
|
-
browser?: Browser;
|
|
327
|
+
browser?: Browser$1;
|
|
262
328
|
browserTag?: BrowserTag;
|
|
263
329
|
useLockedBrowser?: boolean;
|
|
264
330
|
browserInstallBaseUrl?: string;
|
|
@@ -448,6 +514,24 @@ export declare class NestjsPdfService {
|
|
|
448
514
|
* Note: Ensure that the input PDF contains the anchor defined by `anchorText` for the signature field to be positioned correctly. Otherwise, it will be added at a default position.
|
|
449
515
|
*/
|
|
450
516
|
addSignatureFieldSignatureDebtorRaw(pdf: Uint8Array | Buffer, fieldName?: string, anchorText?: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
517
|
+
/**
|
|
518
|
+
* @param pdf The PDF bytes to modify
|
|
519
|
+
* @param options Watermark options (`text` or `image` is required)
|
|
520
|
+
* @returns Modified PDF with the watermark stamped on the selected pages
|
|
521
|
+
* @description Stamps a text or image watermark on an existing PDF. By default the mark is centered, rotated by 45° at 15% opacity on every page. Use `position: 'tile'` to repeat it across the page and `pages` to target specific pages (1-based). To watermark a PDF while generating it, pass the same options as `watermark` in the `PuppeteerParameters`.
|
|
522
|
+
*
|
|
523
|
+
* ```typescript
|
|
524
|
+
* const watermarked = await pdfService.addWatermark(pdf, {
|
|
525
|
+
* text: 'CONFIDENTIAL',
|
|
526
|
+
* color: '#ff0000',
|
|
527
|
+
* opacity: 0.2,
|
|
528
|
+
* });
|
|
529
|
+
* ```
|
|
530
|
+
*
|
|
531
|
+
* Text uses the PDF standard fonts, which only support WinAnsi characters; use an `image` for anything else.
|
|
532
|
+
* @throws WatermarkException when the options are invalid or the PDF cannot be processed
|
|
533
|
+
*/
|
|
534
|
+
addWatermark(pdf: Uint8Array | Buffer, options: WatermarkOptions): Promise<Uint8Array<ArrayBufferLike>>;
|
|
451
535
|
}
|
|
452
536
|
//#endregion
|
|
453
537
|
//#region src/puppeteer/puppeteer.module.d.ts
|
|
@@ -463,4 +547,5 @@ export declare class PuppeteerModule implements OnModuleInit {
|
|
|
463
547
|
static forRootAsync(options: PuppeteerModuleAsyncOptions): DynamicModule;
|
|
464
548
|
}
|
|
465
549
|
//#endregion
|
|
550
|
+
export type { PdfSecurityOptions, WatermarkOptions };
|
|
466
551
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/exceptions/watermark.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/helpers/request-guard.helper.ts","../src/helpers/watermark.helper.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"mappings":";;;;;;;;;;;;oBAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;8BAGoB,2BAA2B;oBAC7B,MAAM;EAEZ,YAAA,iBAAiB;IAAY;;;;;qBCb9B,qCAAqC;WACvC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;EAED,YAAA;;;;qBCHD,+BAA+B;WACjC,OAAI,mBAAA;;;;qBCDF,qCAAqC;WACvC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;;;qBCDF,uCAAuC;WACzC,OAAI,mBAAA;;;;qBCDF,gCAAgC;WAIzB;WAHT,OAAI,mBAAA;EAGK,YAAA,gBAChB,iBACA;IAAY;;;;;qBCNH,2BAA2B;WAC7B,OAAI,mBAAA;;;;;;;;;;;;;wBCQC,uBACd,mBACA;;;;;;;UCYe;;;;;EAKf;;;;;EAKA,eAAe;;;;;EAKf,mBAAmB;;EAEnB;;;;UC/Be;;EAEf;;EAEA,QAAQ,aAAa;;EAErB;;EAEA;;EAEA;;EAEA,oBAAoB;;EAEpB;;EAEA;;EAEA;;EAE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,QAClB,oBACA,sBAA4C,QAAA,WAAA;;;;;;;;;;;;;;;;;;EAsBxC,aAAa,KAAK,aAAa,QAAQ,SAAS,mBAAgB,QAAA,WAAA;;;;iBClSvD,oCAAoC,KACnD;EAGA,SAAS,MAAM,iBAAiB;EAChC,gBACK,MAAM,eACN,QAAQ,uBAAuB;;qBAwBzB,2BAA2B;;EAKpC,YAAA,gBAAgB,gBACQ,WAAW;EAM/B,gBAAY;SAQX,QAAQ,eAAe,sBAAsB;SA8B7C,aAAa,SAAS,8BAA8B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DynamicModule, InjectionToken, ModuleMetadata, OnModuleDestroy, OnModuleInit, OptionalFactoryDependency } from "@nestjs/common";
|
|
2
|
-
import {
|
|
3
|
-
import { Browser
|
|
2
|
+
import { StandardFonts } from "pdf-lib";
|
|
3
|
+
import { Browser, BrowserContext, PDFOptions } from "puppeteer";
|
|
4
|
+
import { Browser as Browser$1 } from "@puppeteer/browsers";
|
|
4
5
|
import { Data, Options } from "ejs";
|
|
5
6
|
import { EtaConfig } from "eta";
|
|
6
7
|
import Handlebars from "handlebars";
|
|
@@ -17,7 +18,8 @@ export declare enum NestjsPdfErrorCode {
|
|
|
17
18
|
BROWSER_UNAVAILABLE = "BROWSER_UNAVAILABLE",
|
|
18
19
|
PDF_GENERATION_ERROR = "PDF_GENERATION_ERROR",
|
|
19
20
|
SIGNATURE_DEPENDENCY_ERROR = "SIGNATURE_DEPENDENCY_ERROR",
|
|
20
|
-
SIGNATURE_PLACEMENT_ERROR = "SIGNATURE_PLACEMENT_ERROR"
|
|
21
|
+
SIGNATURE_PLACEMENT_ERROR = "SIGNATURE_PLACEMENT_ERROR",
|
|
22
|
+
WATERMARK_ERROR = "WATERMARK_ERROR"
|
|
21
23
|
}
|
|
22
24
|
export declare abstract class NestjsPdfException extends Error {
|
|
23
25
|
abstract readonly code: NestjsPdfErrorCode;
|
|
@@ -71,6 +73,11 @@ export declare class TemplateRenderException extends NestjsPdfException {
|
|
|
71
73
|
});
|
|
72
74
|
}
|
|
73
75
|
//#endregion
|
|
76
|
+
//#region src/exceptions/watermark.exception.d.ts
|
|
77
|
+
export declare class WatermarkException extends NestjsPdfException {
|
|
78
|
+
readonly code = NestjsPdfErrorCode.WATERMARK_ERROR;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
74
81
|
//#region src/helpers/getRelativePath.helper.d.ts
|
|
75
82
|
/**
|
|
76
83
|
* Get the relative path to a value from the module directory.
|
|
@@ -83,6 +90,57 @@ export declare class TemplateRenderException extends NestjsPdfException {
|
|
|
83
90
|
*/
|
|
84
91
|
export declare function getRelativePathToValue(moduleDir: string, relativeToModule: string): string;
|
|
85
92
|
//#endregion
|
|
93
|
+
//#region src/helpers/request-guard.helper.d.ts
|
|
94
|
+
/**
|
|
95
|
+
* Filters what the rendered HTML may load (SSRF protection). Disabled unless set:
|
|
96
|
+
* pass `{}` for the defaults (private networks and `file:` blocked).
|
|
97
|
+
*/
|
|
98
|
+
interface PdfSecurityOptions {
|
|
99
|
+
/**
|
|
100
|
+
* Refuse http(s) requests that resolve to a loopback, private, link-local
|
|
101
|
+
* (cloud metadata included) or otherwise non-public address. Default: true
|
|
102
|
+
*/
|
|
103
|
+
blockPrivateNetworks?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* When set, http(s) requests are only allowed to these hosts (`example.com`
|
|
106
|
+
* or `*.example.com`). Listed hosts are trusted, even on a private address.
|
|
107
|
+
*/
|
|
108
|
+
allowedHosts?: Array<string>;
|
|
109
|
+
/**
|
|
110
|
+
* `file:` requests are refused unless the file is inside one of these
|
|
111
|
+
* directories (symbolic links are resolved).
|
|
112
|
+
*/
|
|
113
|
+
allowedFileRoots?: Array<string>;
|
|
114
|
+
/** Set to false to disable JavaScript in the rendered page. Default: true */
|
|
115
|
+
javascriptEnabled?: boolean;
|
|
116
|
+
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/helpers/watermark.helper.d.ts
|
|
119
|
+
interface WatermarkOptions {
|
|
120
|
+
/** Text to stamp. At least one of `text` or `image` is required. */
|
|
121
|
+
text?: string;
|
|
122
|
+
/** PNG or JPEG bytes to stamp. At least one of `text` or `image` is required. */
|
|
123
|
+
image?: Uint8Array | Buffer;
|
|
124
|
+
/** Opacity between 0 (invisible) and 1 (opaque). Default: 0.15 */
|
|
125
|
+
opacity?: number;
|
|
126
|
+
/** Counter-clockwise rotation in degrees. Default: 45 */
|
|
127
|
+
rotation?: number;
|
|
128
|
+
/** Text font size in points. Default: 60 */
|
|
129
|
+
fontSize?: number;
|
|
130
|
+
/** One of the PDF standard fonts (WinAnsi characters only). Default: 'HelveticaBold' */
|
|
131
|
+
font?: keyof typeof StandardFonts;
|
|
132
|
+
/** Text color as `#rgb` or `#rrggbb`. Default: '#808080' */
|
|
133
|
+
color?: string;
|
|
134
|
+
/** Rendered image width in points (aspect ratio preserved). Default: 50% of the page width */
|
|
135
|
+
imageWidth?: number;
|
|
136
|
+
/** `center` stamps once per page, `tile` repeats the mark across the page. Default: 'center' */
|
|
137
|
+
position?: 'center' | 'tile';
|
|
138
|
+
/** Gap in points between two marks when `position` is `tile`. Default: 100 */
|
|
139
|
+
tileSpacing?: number;
|
|
140
|
+
/** 1-based page numbers to watermark. Default: all pages */
|
|
141
|
+
pages?: Array<number>;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
86
144
|
//#region src/puppeteer/browser/browser.service.d.ts
|
|
87
145
|
declare enum BrowserTag {
|
|
88
146
|
LATEST = "latest",
|
|
@@ -100,19 +158,19 @@ declare class BrowserService implements OnModuleDestroy {
|
|
|
100
158
|
shutdownDrainTimeoutMs: number;
|
|
101
159
|
constructor(pdfParams: PuppeteerParameters);
|
|
102
160
|
onModuleDestroy(): Promise<void>;
|
|
103
|
-
getBrowserInstance(args: Array<string>, headless: boolean | 'shell' | undefined, executablePathBin: string | undefined): Promise<Browser
|
|
161
|
+
getBrowserInstance(args: Array<string>, headless: boolean | 'shell' | undefined, executablePathBin: string | undefined): Promise<Browser>;
|
|
104
162
|
createContext(args: Array<string>, headless: Headless, executablePath?: string): Promise<BrowserContext>;
|
|
105
163
|
markJobStarted(): void;
|
|
106
164
|
markJobFinished(): Promise<void>;
|
|
107
165
|
recycleBrowserIfNeeded(): Promise<void>;
|
|
108
166
|
install(lock?: boolean): Promise<import("@puppeteer/browsers").InstalledBrowser | null | undefined>;
|
|
109
|
-
getBrowser(): Browser;
|
|
167
|
+
getBrowser(): Browser$1;
|
|
110
168
|
setBrowserTag(browserTag: BrowserTag): void;
|
|
111
169
|
getBrowserTag(): BrowserTag;
|
|
112
170
|
getBuildId(): string | undefined;
|
|
113
|
-
hasBrowserInstalled(browser: Browser, buildId: string): Promise<boolean>;
|
|
171
|
+
hasBrowserInstalled(browser: Browser$1, buildId: string): Promise<boolean>;
|
|
114
172
|
getExecutablePath(): Promise<string>;
|
|
115
|
-
getLockedBuildId(browser: Browser): string | null;
|
|
173
|
+
getLockedBuildId(browser: Browser$1): string | null;
|
|
116
174
|
}
|
|
117
175
|
//#endregion
|
|
118
176
|
//#region src/puppeteer/engines/ejs/ejs.service.d.ts
|
|
@@ -248,6 +306,14 @@ export declare class PugService {
|
|
|
248
306
|
//#region src/puppeteer/puppeteer-parameters.interface.d.ts
|
|
249
307
|
export interface PuppeteerParameters {
|
|
250
308
|
pdfOptions?: PDFOptions;
|
|
309
|
+
/**
|
|
310
|
+
* Cancels the generation when aborted, including while it waits for a free slot.
|
|
311
|
+
* The promise rejects with `signal.reason`; use `AbortSignal.timeout(ms)` for a timeout.
|
|
312
|
+
*/
|
|
313
|
+
signal?: AbortSignal;
|
|
314
|
+
/** Watermark stamped on the generated PDF. */
|
|
315
|
+
watermark?: WatermarkOptions;
|
|
316
|
+
security?: PdfSecurityOptions;
|
|
251
317
|
hbsOptions?: HandlebarsOptions;
|
|
252
318
|
mjmlOptions?: MJMLParsingOptions;
|
|
253
319
|
pugOptions?: PugOptions;
|
|
@@ -258,7 +324,7 @@ export interface PuppeteerParameters {
|
|
|
258
324
|
chromiumRevision?: string;
|
|
259
325
|
buildId?: string;
|
|
260
326
|
headless?: boolean | 'shell';
|
|
261
|
-
browser?: Browser;
|
|
327
|
+
browser?: Browser$1;
|
|
262
328
|
browserTag?: BrowserTag;
|
|
263
329
|
useLockedBrowser?: boolean;
|
|
264
330
|
browserInstallBaseUrl?: string;
|
|
@@ -448,6 +514,24 @@ export declare class NestjsPdfService {
|
|
|
448
514
|
* Note: Ensure that the input PDF contains the anchor defined by `anchorText` for the signature field to be positioned correctly. Otherwise, it will be added at a default position.
|
|
449
515
|
*/
|
|
450
516
|
addSignatureFieldSignatureDebtorRaw(pdf: Uint8Array | Buffer, fieldName?: string, anchorText?: string): Promise<Uint8Array<ArrayBufferLike>>;
|
|
517
|
+
/**
|
|
518
|
+
* @param pdf The PDF bytes to modify
|
|
519
|
+
* @param options Watermark options (`text` or `image` is required)
|
|
520
|
+
* @returns Modified PDF with the watermark stamped on the selected pages
|
|
521
|
+
* @description Stamps a text or image watermark on an existing PDF. By default the mark is centered, rotated by 45° at 15% opacity on every page. Use `position: 'tile'` to repeat it across the page and `pages` to target specific pages (1-based). To watermark a PDF while generating it, pass the same options as `watermark` in the `PuppeteerParameters`.
|
|
522
|
+
*
|
|
523
|
+
* ```typescript
|
|
524
|
+
* const watermarked = await pdfService.addWatermark(pdf, {
|
|
525
|
+
* text: 'CONFIDENTIAL',
|
|
526
|
+
* color: '#ff0000',
|
|
527
|
+
* opacity: 0.2,
|
|
528
|
+
* });
|
|
529
|
+
* ```
|
|
530
|
+
*
|
|
531
|
+
* Text uses the PDF standard fonts, which only support WinAnsi characters; use an `image` for anything else.
|
|
532
|
+
* @throws WatermarkException when the options are invalid or the PDF cannot be processed
|
|
533
|
+
*/
|
|
534
|
+
addWatermark(pdf: Uint8Array | Buffer, options: WatermarkOptions): Promise<Uint8Array<ArrayBufferLike>>;
|
|
451
535
|
}
|
|
452
536
|
//#endregion
|
|
453
537
|
//#region src/puppeteer/puppeteer.module.d.ts
|
|
@@ -463,4 +547,5 @@ export declare class PuppeteerModule implements OnModuleInit {
|
|
|
463
547
|
static forRootAsync(options: PuppeteerModuleAsyncOptions): DynamicModule;
|
|
464
548
|
}
|
|
465
549
|
//#endregion
|
|
550
|
+
export type { PdfSecurityOptions, WatermarkOptions };
|
|
466
551
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/exceptions/nestjs-pdf.exception.ts","../src/exceptions/browser-installation.exception.ts","../src/exceptions/browser-unavailable.exception.ts","../src/exceptions/engine-not-available.exception.ts","../src/exceptions/pdf-generation.exception.ts","../src/exceptions/signature-dependency.exception.ts","../src/exceptions/signature-placement.exception.ts","../src/exceptions/template-configuration.exception.ts","../src/exceptions/template-render.exception.ts","../src/exceptions/watermark.exception.ts","../src/helpers/getRelativePath.helper.ts","../src/helpers/request-guard.helper.ts","../src/helpers/watermark.helper.ts","../src/puppeteer/browser/browser.service.ts","../src/puppeteer/engines/ejs/ejs.service.ts","../src/puppeteer/engines/eta/eta.service.ts","../src/puppeteer/engines/handlebars/handlebars.service.ts","../src/puppeteer/engines/mustache/mustache.service.ts","../src/puppeteer/engines/nunjucks/nunjucks.service.ts","../src/puppeteer/engines/pug/pug.service.ts","../src/puppeteer/puppeteer-parameters.interface.ts","../src/nestjs-pdf.module.ts","../src/puppeteer/engines/mjml/mjml.service.ts","../src/puppeteer/puppeteer.service.ts","../src/nestjs-pdf.service.ts","../src/puppeteer/puppeteer.module.ts"],"mappings":";;;;;;;;;;;;oBAAY;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;8BAGoB,2BAA2B;oBAC7B,MAAM;EAEZ,YAAA,iBAAiB;IAAY;;;;;qBCb9B,qCAAqC;WACvC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;EAED,YAAA;;;;qBCHD,+BAA+B;WACjC,OAAI,mBAAA;;;;qBCDF,qCAAqC;WACvC,OAAI,mBAAA;;;;qBCDF,oCAAoC;WACtC,OAAI,mBAAA;;;;qBCDF,uCAAuC;WACzC,OAAI,mBAAA;;;;qBCDF,gCAAgC;WAIzB;WAHT,OAAI,mBAAA;EAGK,YAAA,gBAChB,iBACA;IAAY;;;;;qBCNH,2BAA2B;WAC7B,OAAI,mBAAA;;;;;;;;;;;;;wBCQC,uBACd,mBACA;;;;;;;UCYe;;;;;EAKf;;;;;EAKA,eAAe;;;;;EAKf,mBAAmB;;EAEnB;;;;UC/Be;;EAEf;;EAEA,QAAQ,aAAa;;EAErB;;EAEA;;EAEA;;EAEA,oBAAoB;;EAEpB;;EAEA;;EAEA;;EAEA;;EAEA,QAAQ;;;;aCXE;EACV;EACA;EACA;EACA;EACA;;KAGU;cAqCC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