Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
|UI version|‘8.3.2’|
|Core version|‘8.3.0’|
|Build|‘My8xNi8yMDIyfDJiMGM2Y2IyZA==’|
|WebViewer Server|false|
|Full API|false|
Detailed description of issue
Javascript error when trying to setup the FR language : “Uncaught (in promise) TypeError: Cannot set properties of undefined (setting ‘i18n’)”
Screenshot : 2022-03-25_10-52-25
Expected behaviour
just use the right language
Does your issue happen with every document, or just one?
all documents concerned
Code snippet
WebViewer({path: ‘assets/plugins/pdf_js_viewer/lib’,
licenseKey: ‘XXXXX’,
initialDoc: fichier,
}, document.getElementById(‘pdf_viewer’))
.then(instance => {
const { Core, UI } = instance;
instance.UI.setLanguage(‘fr’);
Core.documentViewer.addEventListener('documentLoaded', () => {
instance.Core.documentViewer.zoomTo(2, 0, 300);
})
});
thanks for your help