1

when I embed pdf to html page, I want it to have custom title, not the name of the pdf document. And I can't access it with JS because of shadow DOM.

<embed src="pdfFiles/interfaces.pdf" width="600" height="500" alt="pdf" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">
Tomas Bruckner
  • 718
  • 2
  • 10
  • 22

1 Answers1

1

You cannot access the DOM of a user-agent Shadow DOM, only custom Shadow DOM.

Maybe you can use an alternate way to embed a PDF (without the <embed> tag), like pdf.js from Mozilla.

See this SO question for further detail: Recommended way to embed PDF in HTML

Community
  • 1
  • 1
Supersharp
  • 29,002
  • 9
  • 92
  • 134