I’m using version 8.7.4, installed manually on an existing website. The PDFs on this site are historical documents with OCR’d text that generally does not have spaces between words. So searching for a phrase basically never works. See example below.
Single word search
Note the OCR text preview
Is there a configuration that can help with this issue (e.g. by turning spaces into an optional wildcard)? I know that the core PDFjs viewer, as implemented in Firefox, does not have this limitation, so maybe there’s a well-known way to deal with this.
Below is my code, which is pretty close to default.
const pdf = document.querySelector("[data-pdf]");
if(pdf){
WebViewer({
path: 'xxx',
licenseKey: "xxx",
initialDoc: pdf.dataset.pdf,
disabledElements: [
'toolsHeader',
'ribbonsDropdown',
'toggleNotesButton',
'printButton',
'ribbons',
'contextMenuPopup'
]
}, document.getElementById('viewer')).then(instance => {
const docViewer = instance.docViewer;
const annotManager = instance.annotManager;
instance.UI.setTheme('dark');
});
}
Thanks!
NOTE: Continuing with some additional screenshots below (new users can only include one file upload per post).