diff --git a/src/core/document.js b/src/core/document.js index 11830f0b0..27cbede28 100644 --- a/src/core/document.js +++ b/src/core/document.js @@ -454,6 +454,13 @@ class Page { const structTreeRoot = await this.pdfManager.ensureCatalog( "structTreeRoot" ); + return this.pdfManager.ensure(this, "_parseStructTree", [structTreeRoot]); + } + + /** + * @private + */ + _parseStructTree(structTreeRoot) { const tree = new StructTreePage(structTreeRoot, this.pageDict); tree.parse(); return tree;