@lillallol/outline-pdf
Version:
High level API to add outline to a pdf without any dependency on other programming languages. Works in both browser and node.
15 lines (14 loc) • 452 B
TypeScript
import type { PDFDocument, PDFNumber, PDFRef, PDFHexString, PDFArray, PDFName as _PDFName, PDFDict as _PDFDict } from "pdf-lib";
export declare function createOutlineNodeFactory(_: {
PDFName: typeof _PDFName;
PDFDict: typeof _PDFDict;
}): (doc: PDFDocument, _: {
Title: PDFHexString;
Parent: PDFRef;
Prev?: PDFRef;
Next?: PDFRef;
First?: PDFRef;
Last?: PDFRef;
Count?: PDFNumber;
Dest: PDFArray;
}) => _PDFDict;