File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1085,7 +1085,7 @@ class Catalog {
1085
1085
} ) ;
1086
1086
}
1087
1087
1088
- getPageDict ( pageIndex , skipCount = false ) {
1088
+ getPageDict ( pageIndex ) {
1089
1089
const capability = createPromiseCapability ( ) ;
1090
1090
const nodesToVisit = [ this . _catDict . getRaw ( "Pages" ) ] ;
1091
1091
const visitedNodes = new RefSet ( ) ;
@@ -1153,7 +1153,7 @@ class Catalog {
1153
1153
throw ex ;
1154
1154
}
1155
1155
}
1156
- if ( Number . isInteger ( count ) && count >= 0 && ! skipCount ) {
1156
+ if ( Number . isInteger ( count ) && count >= 0 ) {
1157
1157
// Cache the Kids count, since it can reduce redundant lookups in
1158
1158
// documents where all nodes are found at *one* level of the tree.
1159
1159
const objId = currentNode . objId ;
Original file line number Diff line number Diff line change @@ -1388,7 +1388,7 @@ class PDFDocument {
1388
1388
let pageIndex = 1 ; // The first page was already loaded.
1389
1389
while ( true ) {
1390
1390
try {
1391
- await this . getPage ( pageIndex , /* skipCount = */ true ) ;
1391
+ await this . getPage ( pageIndex ) ;
1392
1392
} catch ( reasonLoop ) {
1393
1393
if ( reasonLoop instanceof PageDictMissingException ) {
1394
1394
break ;
Original file line number Diff line number Diff line change @@ -457,6 +457,14 @@ describe("api", function () {
457
457
const pdfDocument = await loadingTask . promise ;
458
458
expect ( pdfDocument . numPages ) . toEqual ( 1 ) ;
459
459
460
+ const page = await pdfDocument . getPage ( 1 ) ;
461
+ expect ( page instanceof PDFPageProxy ) . toEqual ( true ) ;
462
+
463
+ const opList = await page . getOperatorList ( ) ;
464
+ expect ( opList . fnArray . length ) . toEqual ( 0 ) ;
465
+ expect ( opList . argsArray . length ) . toEqual ( 0 ) ;
466
+ expect ( opList . lastChunk ) . toEqual ( true ) ;
467
+
460
468
await loadingTask . destroy ( ) ;
461
469
} ) ;
462
470
You can’t perform that action at this time.
0 commit comments