Is there any way to access metadata of PDF file I embedded using pdfobject.js? I would like to replace/change its title because it’s not corresponding to its filename. example is the snip below. filename of that is ‘D1000SPN.pdf’ which is different from the title displaying. I tried to search but found none. However, since I can’t find a solution to that. I decided to just not display the PDF title on its toolbar anymore or hide it. I’m a newbie so please bare with me.
Advertisement
Answer
Check the section https://pdfobject.com/#the-why Specifically, where it says “What PDFObject doesn’t do”.
In a nutshell: “PDFObject does not provide the ability to customize the look and feel of the PDF toolbar.”
Why? “PDFObject is not a rendering engine. PDFObject just writes an element to the page, and relies on the browser or browser plugins to render the PDF.”
It continues elaborating… “If you really need to customize the toolbar, try forking Mozilla’s PDF.js and customizing it to suit your needs.”
But maybe there is hope…
“Some of these browsers provide the ability to show or hide the toolbar, or a feature such as the search field, via PDF Open Parmeters”.
See the image below:
I tried it on Chrome and worked for me. Good luck.