Getting error log on loading a particular pdf

PDF.js Express Version

Detailed description of issue
Getting this error log on loading this pdf -
Cannot read property ‘1’ of undefined
at webpack_exports._getXYDest (PDFJSDocumentType.js:2302)
at new LinkAnnotationElement (PDFJSDocumentType.js:1561)

at Function.value (PDFJSDocumentType.js:1563)
at PDFJSDocumentType.js:2280
at ()
at PDFJSDocumentType.js:2280
Expected behaviour
{Provide a screenshot or description of the expected behaviour}

Does your issue happen with every document, or just one?
Getting this issue with this pdf currently. I am getting an error in extracting the xfdf from it as well . PFA pdf
Solais-ProductSheet-FP-Ge.pdf (1.7 MB)
Link to document
{Provide a link to the document in question if possible}

Code snippet
{Provide a relevant code snippet}


I cannot reproduce this issue in 7.3.1. Can you please make sure you are using the latest version? Also in the future, please include your PDF.js Express version in your tickets. The version is logged to the console when Express is loaded.


Hey Logan,
I am using version 7.2.2 of pdfjs express.Can you replicate on this version?

Yes I can reproduce in 7.2.2. Please try upgrading to 7.3.1.


Thanks for your help! I tried installing pdfjs express again to get the latest version using npm i @pdftron/pdfjs-express but still getting version 7.2.2 on my console log .

Is there something else that I need to upgrade as well?

Please make sure that you delete all the old dependencies (including the ones that you moved into your “public” folder), and then install 7.3.1, and then move over your dependencies again (See part 2 of this guide.


Hey , thanks for the help . Tried replicating the steps and now I get the correct version on my console but I am still getting the same bug.

I still cannot reproduce, even with the document you sent :frowning:

Do you have any custom code that could potentially be breaking something?

I am not having an issue in loading the file on the viewer but I am getting these errors on my console. Also, I am not able to extract xfdf string using exportAnnotations api on this.

I can’t make Express throw that error message, and I can export annotations as expected.

I will need some more details about your set up in order to help you. Stuff like - what browser, how are you loading the document, any relevant code snippets, when does the error happen, etc.

I just re-installed pdfjs express after deleting my node modules and the path to my webviewer. Now it works for me .

Thanks for helping out Logan . You are a lifesaver !

1 Like