Customized error message on loading error of PDF in PDFTron

Solution 1:

The easiest way to do this right now is to modify the ErrorModal component in the UI and replace the error messages there. You'll need to string match the old message and replace it with your own.

The component is located at ui/src/components/ErrorModal/ErrorModal.js and you'll want to change the onError function.

This link describes more about how to edit and build the UI https://www.pdftron.com/documentation/web/guides/ui/advanced-customization