Overlay PDF Comparision is not working when we updated webviewer version 7.3.3 to version 8.3.3 webviewer

Hello Team,

We are implementing overlay comparison for pdf documents in webiewer. In verion 7.3.3 it is working as expected, but when we updated lates 8.3.3 version, it is not comparing for all pages if both the documents has different pages length.
example, Document 1 has 6 pages and Document 2 has 10 pages. Then it compares only 6 pages and for other pages it throws an exception below.

this issue exist if both the documents have different pages length. if both are same it will compare fine.
below code this case we used,

below Site I referred

Please help me on this to resolve this issue.

Vijaykumar L S

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hello vlakkenahalli,

Looking at the errors you are getting in the console screenshot you provided, you do not have Content-Range enabled, please check out: PDFTron

I can also see in the error and the code you provided, you are assigning a constant variable a new value:

const page1 = doc1Pages[i]
... later on

page1 = new PDFNet.Page(0);

This would cause that error and potentially cause issues.

Best regards,
Tyler Gordon
Web Development Support Engineer