Searching Feature is not working on some file

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
Detailed description of issue
Searching on PDF is not working on some pdf. It is tested on small file size, large file size and Pages are like 6 and 465±40.

Expected behaviour
Show the result of search on every file.

Does your issue happen with every document, or just one?
Some Document

Link to document
Clean Code “Robert Cecil Martin”

Code snippet
import WebViewer from ‘@pdftron/pdfjs-express’
window.pdfViewerInit = function (element) {
let file = element.getAttribute(‘src’);
const url = new URL(file);
path: ‘/public’, // point to where the files you copied are served from
disabledElements: url.searchParams.get(‘download’) == “true” ? : [
initialDoc: file
}, element).then((instance) => {
const { documentViewer } = instance.Core;

	// search can only be performed after a document is loaded
	documentViewer.addEventListener('documentLoaded', () => {


Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

Hi there,

Do you have a link to a file that the search is not working on? How are you performing the search? it looks like you aren’t doing it programmatically, is that correct?

Best Regards,

Actually, I did test it both way.
This File is not work
simple.pdf (615.1 KB)
Demo File is work
demo.pdf (634.7 KB)

Hi there,

Are you able to search this PDF using our demo site? PDF.js Viewer Demo | PDF.js Express

I was not able to reproduce this issue. On our demo site I was able to search this PDF for the term “coder”.

I also tried searching “coder” in Adobe Acrobat and I found 14 results as well.

Could you provide the code you are using to search?

Best Regards,

I sincerely appreciate your assistance, although I realize I may have taken up more of your time than intended. Thank you for your patience. I will endeavor to resolve the matter on my own. Thank you again.