When I open a PDF file via a normal link (e.g., https://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf), Chrome opens the PDF in the same tab with Chrome's integrated PDF viewer component.
In this state, I want to access elements of the document, e.g., the tag in the of the document. However, I cannot read any elements via Selenium:
Calling driver.page_source only returns a minimal HTML framework (without the tag or visible content).
Even an explicit find_element (e.g., on head > title) fails.
Even if I wait until the page is fully loaded, the elements remain untraceable.
In the DevTools Inspector, however, I can see that Chrome internally uses a shadow root structure for the PDF viewer.
However, I don't want to access the shadow DOM elements, only what Chrome already displays in the root document.

Question: How can I get this element and its text? I have quite experience with selenium but I just can't see what I'm doing wrong. Here is also the code, I used for my example
_driver.Navigate().GoToUrl("https://unec.edu.az/application/uploads/2014/12/pdf-sample.pdf");
// I got a breakpoint here, to wait until the page is fully loaded, then I move on
var pageSourceUni = _driver.PageSource;
var allElements = _driver.FindElements(By.XPath("//*"));
// allElements contains only 4 WebElements (html, head, body, embed)
var titleElement = _driver.FindElements(By.CssSelector("head > title"));
//Cant find titleElement
Here is also what pageSourceUni contains:
<html>
<head></head>
<body style="height: 100%; width: 100%; overflow: hidden; margin:0px; background-color: rgb(40, 40, 40);">
<embed name="788D80E57272EEC95D5C09EEECDBAFF7" style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="about:blank" type="application/pdf" internalid="788D80E57272EEC95D5C09EEECDBAFF7">
</body>
</html>
Honestly, I don't understand why I get this HTML in pageSource. The only explanation I can think of is that this is the basic HTML, and then everything else is reloaded and modified with AJAX, so that in the end I get the HTML that I also see in Chrome Inspector.