How to load pdf worker javascript in wordpress

I have to display pdf thumb in wordpress and I’m using pdfjs. I want to load worker script in javascript but i don’t understand how to load pdf.workder.js in javascript code. as i have only knowldge of wp_enqueue_script but dont know how to get script path.

PDFJS.workerSrc ="path/pdf.worker.js";

Now how to get path in javascript at runtime in wordpress.

Read more here: How to load pdf worker javascript in wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *