Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file modified examples/kitchen-sink-accessible.pdf
Binary file not shown.
13 changes: 10 additions & 3 deletions lib/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,20 @@ class PDFPage {
});

// The page dictionary
this.dictionary = this.document.ref({
const pageDictionary = {
Type: 'Page',
Parent: this.document._root.data.Pages,
MediaBox: [0, 0, this.width, this.height],
Contents: this.content,
Resources: this.resources
});
Resources: this.resources,
};

// Set tab order if document is tagged for accessibility.
if (this.document.getMarkInfoDictionary().data.Marked === true) {
pageDictionary.Tabs = 'S';
}

this.dictionary = this.document.ref(pageDictionary);

this.markings = [];
}
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/markings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,11 @@ EMC
`(My Title)`,
`endobj`
]);
expect(docData).toContainChunk([
`10 0 obj`,
/\/Tabs \/S/,
`endobj`
]);
});
});

Expand Down