diff --git a/src/modules/outline.js b/src/modules/outline.js index 52fd8740d..ab3599489 100644 --- a/src/modules/outline.js +++ b/src/modules/outline.js @@ -121,7 +121,7 @@ import { jsPDF } from "../jspdf.js"; }; /** - * Options: pageNumber + * Options: pageNumber, pageOffsetY */ pdf.outline.add = function(parent, title, options) { var item = { @@ -219,7 +219,7 @@ import { jsPDF } from "../jspdf.js"; "[" + info.objId + " 0 R /XYZ 0 " + - getVerticalCoordinateString(0) + + getVerticalCoordinateString(item.options.pageOffsetY || 0) + " 0]" ); // this line does not work on all clients (pageNumber instead of page ref) diff --git a/types/index.d.ts b/types/index.d.ts index 8a9553073..87a5740d1 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -274,6 +274,7 @@ declare module "jspdf" { } export interface OutlineOptions { pageNumber: number; + pageOffsetY?: number; } // jsPDF plugin: AcroForm export abstract class AcroFormField {}