title: chromium "application/x-google-chrome-pdf" how to extract height of pdf by javascript?
body: <p>I'm trying to extract height of <code>document</code>, while browsing <code>pdf</code> with chromium's default pdf-viewer extension.</p>
  
  <p>There are two DevTools possible to open, one - DevTools of <code>Tab</code>, need to open before opening pdf:</p>
  
  <pre><code>&gt; document.querySelectorAll("embed")[0].type
  "application/pdf"
  </code></pre>
  
  <p>And second, after extension complete pdf loading:</p>
  
  <pre><code>&gt; document.querySelectorAll("embed")[0].type
  "application/x-google-chrome-pdf"
  </code></pre>
  
  <p>There are common trick to extract <code>height</code>:</p>
  
  <pre><code>var body = document.body;
  var html = document.documentElement;
  var height = Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight );
  </code></pre>
  
  <p>Extension's DevTools tells me: <code>432,853</code>, but DevTools of Tab, gives me only <code>848</code>.</p>
  
  <p>Off-course, the right one - is 432,853. And me needs it, I want to get it in my own chrome's extension. While, I'm able extract height on any web-page or text file from disk <code>file://</code>, the pdf - is only one big black-box, that I can not hack yet. Please, help!</p>
  
  <p>I know about isolated words, from <a href="https://stackoverflow.com/questions/36672980/how-do-i-access-all-window-objects-from-a-chrome-extension">here</a>, and I've googled alot around. But there shall be such trick, like getting <code>window</code>'s scroll's toddler size or something like that... </p>