Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vertical offset option for outline module #3764

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/modules/outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ import { jsPDF } from "../jspdf.js";
};

/**
* Options: pageNumber
* Options: pageNumber, pageOffsetY
*/
pdf.outline.add = function(parent, title, options) {
var item = {
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ declare module "jspdf" {
}
export interface OutlineOptions {
pageNumber: number;
pageOffsetY?: number;
}
// jsPDF plugin: AcroForm
export abstract class AcroFormField {}
Expand Down