mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Ensure that getStructTree
won't break with disableAutoFetch = true
set (PR 13171 follow-up)
Open http://localhost:8888/web/viewer.html?file=/test/pdfs/pdf.pdf#disableStream=true&disableAutoFetch=true and observe the following message in the console (repeated for each page of the document): ``` Uncaught (in promise) Object { message: "Missing data [19787293, 19787294)", name: "UnknownErrorException", details: "MissingDataException: Missing data [19787293, 19787294)", stack: "BaseExceptionClosure@http://localhost:8888/src/shared/util.js:458:29\n@http://localhost:8888/src/shared/util.js:462:3\n" } ```
This commit is contained in:
parent
4ac1082838
commit
ff4dae05b0
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue