{"action":"created","issue":{"url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/187","labels_url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/187/comments","events_url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/187/events","html_url":"https://github.com/zhangxiaoming/pdfium/issues/187","id":105089426,"number":187,"title":"this.hostContainer undefined in JavaScript API","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zhangxiaoming/pdfium/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/zhangxiaoming/pdfium/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/zhangxiaoming/pdfium/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-06T11:42:38Z","updated_at":"2015-09-08T21:43:27Z","closed_at":null,"body":"```\nI'm hoping this is the right place. I'm developing a web application that uses \nsome obscure (but official) features of PDF that work with Adobe's official \nplugin but not with the built-in viewer in Google Chrome, which I understand to \nbe PDFium.. ..If I need to take my troubles elsewhere, I won't be offended. :)\n\nWhat steps will reproduce the problem?\n1. Author (or acquire) a PDF that uses postMessage/hostContainer to communicate \nwith a host webpage. I've attached a sample that just alerts the value of \nthis.hostContainer.\n2. Open it with Chrome (tested with Version 43.0.2357.134 m)\n3. hostContainer is undefined.\n\nWhat is the expected output? What do you see instead?\nI'm expecting to be able to use postMessage from a web page that contains a PDF \nto send arrays of data to a handler that the PDF attaches to the hostContainer \nproperty of the current document. However, when the PDF attempts to create that \nhandler, it can't because the hostContainer property isn't there. It's unable \nto send messages back to the containing webpage for the same reason - the \npostMessage method that's required to send messages back also lives on the \nhostContainer property, per Adobe's Acrobat JavaScript Programming Reference: \nhttp://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.p\ndf#page=242\n\nWhat version of the product are you using? On what operating system?\nWindows 8.1, Chrome Version 43.0.2357.134 m. chrome://plugins doesn't give a \nversion number for \"Chrome PDF Viewer\", which I understand to be PDFium.\n\nPlease provide any additional information below.\nIf there's another way to achieve bidirectional communication between the PDF \nand the containing web page using the APIs available in Chrome/PDFium (or even \ndocumentation for what's available, so I can do my own digging), I'm game to \nshim something in.\n\nAny help would be appreciated - and if it's not supported and not going to be \nsupported, knowing that would be helpful too.\n\nThanks!\n\n```\n\nOriginal issue reported on code.google.com by `wsc...@gmail.com` on 21 Jul 2015 at 9:40\n\nAttachments:\n* [sample.pdf](https://storage.googleapis.com/google-code-attachments/pdfium/issue-187/comment-0/sample.pdf)\n"},"comment":{"url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/comments/138712866","html_url":"https://github.com/zhangxiaoming/pdfium/issues/187#issuecomment-138712866","issue_url":"https://api.github.com/repos/zhangxiaoming/pdfium/issues/187","id":138712866,"user":{"login":"jmasinter","id":15699,"avatar_url":"https://avatars.githubusercontent.com/u/15699?v=3","gravatar_id":"","url":"https://api.github.com/users/jmasinter","html_url":"https://github.com/jmasinter","followers_url":"https://api.github.com/users/jmasinter/followers","following_url":"https://api.github.com/users/jmasinter/following{/other_user}","gists_url":"https://api.github.com/users/jmasinter/gists{/gist_id}","starred_url":"https://api.github.com/users/jmasinter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmasinter/subscriptions","organizations_url":"https://api.github.com/users/jmasinter/orgs","repos_url":"https://api.github.com/users/jmasinter/repos","events_url":"https://api.github.com/users/jmasinter/events{/privacy}","received_events_url":"https://api.github.com/users/jmasinter/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T21:43:27Z","updated_at":"2015-09-08T21:43:27Z","body":"OP- you are not alone\r\nDeciding to build a web application with emedded interactive PDF as a core function was a huge mistake! "}}