Skip to main content
Participant
December 14, 2016
Question

Javascript hostContainer

  • December 14, 2016
  • 2 replies
  • 781 views

Does anyone have any sample code demonstrating hostContainer.postMessage javascript function working with IE11 and Adobe Reader DC?  I have spent the last several days trying about every combination of code I could think of and cannot get it to work.  All I want to do is notify my program once the PDF has printed.  I have the DIDPRINT routine firing but I cannot get my browser to recognize the postMessage command.

Any help appreciated,

Joe

This topic has been closed for replies.

2 replies

Inspiring
December 15, 2016

Adobe Acrobat JavaScript is not the same as web JavaScript. If you want to have a pop-up message appear use the "app.alert()" statement.

In Acrobat/Reader you cannot access the full host container only the objects within the host container.

Participant
December 15, 2016

So how do I let my web browser know when the user has printed the PDF document?

Inspiring
December 15, 2016

You can use the Soap object. See the Acrobat JavaScript API Reference.

try67
Community Expert
Community Expert
December 15, 2016

[Question moved to the JavaScript forum]