Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Call PDF Javascript Function from External HTML Document

Avatar

Former Community Member

Greetings,

Forgive me if this information has been posted previously - I've searched quite a bit and haven't quite found anything specific or similar.

We have LiveCycle Designed forms, and are including the Form in an IFRAME within an HTML page.  From there, we would like to be able to call one of the functions we've added to the LiveCycle form.

So for example,

<HTML>
<HEAD><TITLE></TITLE>
<SCRIPT type="text/javascript">
function CallFunc()
{
window.PDFFrame.TestFunc();
}
</SCRIPT>
</HEAD>
<BODY>
<iframe src="MyPDFFile.pdf" width="100%" height="100%" name="PDFFrame" id="PDFFrame"></iframe>
</HTML>

The "window.PDFFrame.TestFunc()" is where I'm running into issues.  I have tried to use PDFFrame.xfa.etc, and PDFFrame.document.etc, but I'm not sure of the appropriate method to access this PDF Document's functions.

I do have a "TestFunc()" defined (tested and working) in the PDF document (designed in LiveCycle).


Any advice is much appreciated -

Thanks!

2 Replies

Avatar

Former Community Member

I have attempted to use the information found here for this task:

http://livedocs.adobe.com/flex/3/html/help.html?content=PDF_1.html

But is this outdated?  Using the LiveCycle Designer, I have not been able to utilize the "this.hostContainer.messageHandler" with any success.  Is their an equivalent xfa.etc handler?  Or if "this.hostContainer.messageHandler" is still available to Acrobat 9.X documents, what are the appropriate steps to using this?  I've tried putting it in the document initializer, docReady, and Page events and it doesn't seem to be available in any of those.

Any advice is appreciated,

Thanks!

Avatar

Level 1

hi i have same problem, have you now a solution ? tnk