How to detect semantic comparison is started and finished in case of using default compare pages button.

Product:webviewer library

Product Version: 11.1.0

Please give a brief summary of your issue:
(Think of this as an email subject)
I am using javascript web viewer library 11.1.0 and I want to compare pages simantically.
Now I am doing it with enabling ‘ComparePages’ feature like this UI.enableFeatures([UI.Feature.ComparePages]); and by clicking comapre pages button in the toolbar.
It’s working well but I’d like to add loading spinner during the comparison.
So I tried to detect when the ‘compare pages’ item is clicked on toolbar and finished comparison.

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


How to detect if the compare pages button is clicked and comparison is finished?

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

1 Like

Hi there,

We don’t have an API for when that button gets pressed, but we have the following events that you can use:

UI.Events. multiViewerReady to ensure the second documentViewer has been initialized:

UI.Events.compareAnnotationsLoaded - triggered when compare annotations are loaded:
https://sdk.apryse.com/api/web/UI.html#event:compareAnnotationsLoaded__anchor

Best regards,
Kevin

1 Like

Hi, there.
If so, can you provide apryse semantic text comparison sample code?

Best wishes,
Austin

1 Like

Hi there,

The semantic text comparison showcase is based on this guide:

Best regards,
Kevin

1 Like

Thanks a lot.
Best wishes,
Austin Ryder

1 Like