@syncfusion/ej2-pdf 24.2.7 → 24.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39361,18 +39361,24 @@ class _PdfCrossReference {
39361
39361
  }
39362
39362
  }
39363
39363
  let hasRoot = false;
39364
+ let root;
39364
39365
  try {
39365
- const root = trailerDictionary.get('Root');
39366
- if (root) {
39366
+ root = trailerDictionary.get('Root');
39367
+ }
39368
+ catch (e) {
39369
+ throw new BaseException('Invalid cross reference', 'XRefParseException');
39370
+ }
39371
+ if (root) {
39372
+ try {
39367
39373
  const pagesEntry = root.get('Pages');
39368
39374
  if (pagesEntry) {
39369
39375
  this._root = root;
39370
39376
  hasRoot = true;
39371
39377
  }
39372
39378
  }
39373
- }
39374
- catch (ex) {
39375
- throw new BaseException('Invalid cross reference', 'InvalidXRef');
39379
+ catch (ex) {
39380
+ throw new BaseException('Invalid cross reference', 'InvalidXRef');
39381
+ }
39376
39382
  }
39377
39383
  if (!hasRoot) {
39378
39384
  if (!recoveryMode) {