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
@ -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…
x
Reference in New Issue
Block a user