I have a content script loaded in Chrome. When I print a docx in google drive, Chrome opens the file in a new page which embeds the file as follows:
<embed width="100%" height="100%" name="plugin" id="plugin" src="https://doc-10-78-apps-viewer.googleusercontent.com/viewer/secure/pdf/ir7ttre15krrkcd49ssmvhgcd62pctgr/g7os4cqtfut2cmfmtp6cbjtg0h8mjvpo/1501677900000/drive/06250768728759024610/ACFrOgDlcxE7Uuy3abO4J9PRed248Bo9jg98MyEkYAWd__U3toMC_UmFuduTui1avT4riw0WkJ76SDJgVmnRCux35KP_KCojyy6Oude4B463MJeySVSryycvi6dd-38=" type="application/pdf" internalinstanceid="9" title="">
How can I read the file contents? I tried document.getElementById('plugin').contentDocument
or document.getElementById('plugin').contentWindow
but neither of them exists.