Scroll position resetting when filling document using applyTemplateValues with large document

WebViewer Version: @pdftron/webviewer@10.6.0-20240103 (as per Can’t donwload with template generation variables)

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
Scroll position resetting when filling document using applyTemplateValues with large document

Please describe your issue and provide steps to reproduce it:
As per this issue: Issue with applyTemplateValues on large docx documents, we are using the template generation function with quite large word documents (sometimes up to 20-30 pages in length).

I have noticed that on filling the document using applyTemplateValues with documents of a certain size, the scroll position is not set properly on the completion of document generation. I have been able to replicate this using the link at Document Generation using Text/Image Template With JS Demo | Apryse WebViewer with the attached document and the following steps:

  • Upload the attached document
  • Scroll to the very bottom of the document
  • Fill in the value ‘test’
    apryse_test.docx (17.5 KB)
    for the template field and select Fill Template

Expected behaviour: Scroll position is maintained after filling the template
Actual behaviour: Scroll position is set to approximately halfway through the supplied document after filling the template

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

Hello Jake,

Thank you for reporting the scroll issue when applying template fills.
I was able to reproduce this as well and have sent in a bug report for the team to look at.
We don’t have a firm timeline for when this ticket will be worked on but we will let you know when that happens.

Regards,
Luke