PDFDocument
class PDFDocument extends Document { }
constructor();
constructor(data: Buffer | ArrayBuffer | Uint8Array);
constructor(pointer: Pointer<"any_document">);
abandonOperation(): void;
addCJKFont(
font: Font,
lang: FontCJKOrdering | FontCJKLanguage,
wmode?: number,
serif?: boolean,
): PDFObject;addEmbeddedFile(
filename: string,
mimetype: string,
contents: AnyBuffer,
created: Date,
modified: Date,
checksum?: boolean,
): PDFObject;bake(bakeAnnots?: boolean, bakeWidgets?: boolean): void;
beginImplicitOperation(): void;
beginOperation(op: string): void;
canBeSavedIncrementally(): boolean;
canRedo(): boolean;
canUndo(): boolean;
countObjects(): number;
countUnsavedVersions(): number;
countVersions(): number;
createObject(): PDFObject;
deletePage(at: number): void;
deletePageLabels(index: number): void;
disableJS(): void;
enableJournal(): void;
enableJS(): void;
endOperation(): void;
getEmbeddedFileParams(ref: PDFObject): {
filename: string;
mimetype: string;
size: Pointer<"char">;
creationDate: Date;
modificationDate: Date;
};getEmbeddedFiles(): any;
getJournal(): {
position: number;
steps: string[];
};getLanguage(): string;
getTrailer(): PDFObject;
getVersion(): number;
hasUnsavedChanges(): boolean;
isJSSupported(): boolean;
newGraftMap(): PDFGraftMap;
newNull(): PDFObject;
rearrangePages(pages: number[]): void;
redo(): void;
setJSEventListener(_listener: any): void;
setLanguage(lang: string): void;
setPageLabels(
index: number,
style?: string,
prefix?: string,
start?: number,
): void;undo(): void;
validateChangeHistory(): number;
wasRepaired(): boolean;
static readonly PAGE_LABEL_ALPHA_LC: string;
static readonly PAGE_LABEL_ALPHA_UC: string;
static readonly PAGE_LABEL_DECIMAL: string;
static readonly PAGE_LABEL_NONE: string;
static readonly PAGE_LABEL_ROMAN_LC: string;
static readonly PAGE_LABEL_ROMAN_UC: string;