pdfcpu
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sebastian Frank 2022-02-03 17:20:13 +01:00
parent d40b64676e
commit af7ded48f4
Signed by: apairon
GPG Key ID: A0E05A8199CE3F57

25
index.d.ts vendored
View File

@ -151,8 +151,11 @@ interface FsPackage {
* read a file relative to config dir and return its content
*
* @param path relative file path
* @param options optional options
*/
readFile(path: string): string
readFile(path: string, options?: {
bytes: boolean // if true return []byte instead of string
}): string
/**
* stat file or directory
@ -430,6 +433,8 @@ interface PdfPackage {
*
* @param html html string
* @param options options
*
* @returns []byte of pdf data
*/
fromHTML(
html: string,
@ -471,6 +476,24 @@ interface PdfPackage {
headerHtml?: string // URL to header html
}
): any
/**
* process existing pdf data
*
* @param command pdfcpu command
* @param pdfData []byte of pdf data
* @param options options
*
* @returns []byte of new pdf data
*/
cpu(
command: "watermark",
pdfData: any,
options: {
mode: "image"
bytes: any // []byte of watermark image
}
): any
}
export interface HookContext