Rendering of XLSX document issue

Product:

Product Version: 10.6.0

Please give a brief summary of your issue:
(Think of this as an email subject)

on loading of xlsx files with irregular widths, user is facing issue i.e. user not staying at center of document viewer.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

demo_issue.xlsx (68.3 KB)
on loading the above attached xlsx types of documents where there is irregular page width on pdftron, user is able to not able to stay on the center of the webviewer, instead stays to the left of webviewer.

Please refer to the below linked video for clear understanding.

Please provide a link to a minimal sample where the issue is reproducible:

Thanks

1 Like

Hello Arjun,

Thank you for contacting WebViewer Forums.

Are you able to reproduce this issue on our demo showcase? https://showcase.apryse.com/
It should stay in the center relative to the first page loaded.

Are you doing any kind of page manipulation in your application?

Regards,
Luke

1 Like

Sorry Luke for the delayed response,

Yes I am aware of the fact the that it stays in the center relative to the first page loaded. But no, I am unable to reproduce on demo showcase. And no, we are not performing any kind of page manipulation.

Hereby I have attached drive link for the demo angular project with the particular file and video showing the issue user is facing, kindly refer to the demo angular project.

Google Drive Link.

Thanks,
Arjun

1 Like

Hello Arjun,

Thank you for providing a sample project. I was able to see the unexpected behaviour when loading this file document.

Does this also happen in production environment or just the sample demo? Are you able to reproduce with other files?

It seems the pages are being updated in blocks and then matching the page’s orientation from the latest call, resulting in the shift of the first page. We can fix this issue by manually calling setFitMode after the document loads:

instance.UI.setFitMode(instance.UI.FitMode.FitWidth)

Best regards,
Luke

1 Like

Hello Luke,
Thanks for the response.

The project is still under development so can’t test in prod environment,
And as far the other files are concerned, we are only able to reproduce it on such .xlsx documents with different page width.

The fix provided by you:

instance.UI.setFitMode(instance.UI.FitMode.FitWidth)

didn’t work for the project, was still facing the same issue.

Is there any probability that because we are using WebViewer Client and not WebViewer Server?

Thanks,
Arjun

1 Like

Hello Arjun,

It may be a timing issue since we want to update the width after the document loads. Please update the above code to run after annotationsLoaded event has triggered or you can add a setTimeout():

documentViewer.addEventListener('annotationsLoaded', () => {
        instance.UI.setFitMode(instance.UI.FitMode.FitWidth);
      });

Regards,
Luke

2 Likes