
#################################
A3DPDFDocumentSetActionJavascript
#################################

.. c:function:: A3DStatus A3DPDFDocumentSetActionJavascript(A3DPDFDocument *pDoc, const A3DPDFEEventActionType eEventActionType, const A3DUTF8Char *pcJavascriptString)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DPDFDocumentSetActionJavascript(:c:type:`~A3DPDFDocument`\ \* **pDoc**\ , *const* :c:enum:`~A3DPDFEEventActionType` **eEventActionType**\ , *const* :c:type:`~A3DUTF8Char`\ \* **pcJavascriptString**\ )
   
   Function to define a javaScript action to an event triggered on the document.
   
   The JavaScript is defined as a string.
   
   **Parameters**
   
   
      **pDoc**\ : The Document object to work with.
   
      **eEventActionType**\ : The action type. Only :c:enumerator:`~kA3DPDFEventDocWillClose`\ , :c:enumerator:`~kA3DPDFEventDocWillSave` :c:enumerator:`~kA3DPDFEventDocDidSave` :c:enumerator:`~kA3DPDFEventDocWillPrint`\ and :c:enumerator:`~kA3DPDFEventDocDidPrint`\ are relevant at document level.
   
      **pcJavascriptString**\ : The string which contains the JavaScript.
   
   
   **Returns**
   
   
      A3D_SUCCESS in case of success or an error code
   
   




