Remove the unused skipCount
parameter from Catalog.getPageDict
(PR 14311 follow-up)
This was added in PR 14311, but given that I completely missed to update the `PDFDocument.getPage` signature accordingly it's completely unused. Given that things work just as fine as-is, let's simply remove that optional parameter for now; sorry about the churn here!
This commit is contained in:
parent
d9e0de8515
commit
e045cd4520
@ -1085,7 +1085,7 @@ class Catalog {
|
||||
});
|
||||
}
|
||||
|
||||
getPageDict(pageIndex, skipCount = false) {
|
||||
getPageDict(pageIndex) {
|
||||
const capability = createPromiseCapability();
|
||||
const nodesToVisit = [this._catDict.getRaw("Pages")];
|
||||
const visitedNodes = new RefSet();
|
||||
@ -1153,7 +1153,7 @@ class Catalog {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
if (Number.isInteger(count) && count >= 0 && !skipCount) {
|
||||
if (Number.isInteger(count) && count >= 0) {
|
||||
// Cache the Kids count, since it can reduce redundant lookups in
|
||||
// documents where all nodes are found at *one* level of the tree.
|
||||
const objId = currentNode.objId;
|
||||
|
@ -1388,7 +1388,7 @@ class PDFDocument {
|
||||
let pageIndex = 1; // The first page was already loaded.
|
||||
while (true) {
|
||||
try {
|
||||
await this.getPage(pageIndex, /* skipCount = */ true);
|
||||
await this.getPage(pageIndex);
|
||||
} catch (reasonLoop) {
|
||||
if (reasonLoop instanceof PageDictMissingException) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user