This commit is contained in:
parent
d40b64676e
commit
af7ded48f4
25
index.d.ts
vendored
25
index.d.ts
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user