Check if PDF Auto Signer is running
Audience:
Low-code EngineersSkill Prerequisites:
Actions,JavaScript
Checks from the user's browser whether the PDF AutoSigner app is running on the user's computer, then runs your JavaScript with the answer. Use it before Sign PDF to tell users to start the app.
The action is available in forms and listings.
The action comes from the PDF AutoSigner integration package (PlantAnApp.Integrations.PdfAutoSigner). If you don't see it, the package isn't installed.
Typical Use Cases
- Show a warning on a signing form when the PDF AutoSigner app isn't running
- Enable a "Sign" button only when the app can be reached
- Help users troubleshoot signing problems
Don't use it to
- Check anything on the server. The check runs in the user's browser, against the user's own computer.
- Run more actions based on the answer. The action ends execution, and the answer arrives later in the browser. Put the follow-up logic in
Javascript Code.
Related Actions
| Action Name | Description |
|---|---|
| Sign PDF | Signs a PDF using the PDF AutoSigner app. |
| Check PDF Signature | Checks whether a PDF has an electronic signature. |
| Execute Javascript Code And Stop Execution | Runs any JavaScript in the browser and ends execution. |
Input Parameter Reference
| Parameter | Description | Supports Tokens | Default | Required |
|---|---|---|---|---|
| Javascript Code | The JavaScript to run when the answer arrives. It can use the result and responseOrError variables described below. Tokens are replaced on the server before the code is sent. In a form, fields are available as form.fields.<FieldName>.value. | Yes | empty string | No |
Variables available in the code
| Variable | Description |
|---|---|
result | true if the app answered, false if it didn't. |
responseOrError | When result is true, the app's response, which is the list of signature names available on the computer. When it's false, the error from the browser. |
How it works
- The action ends execution and sends code to the browser. No actions after it run.
- The browser sends a request to
http://localhost:7521/api/sign, where the PDF AutoSigner app listens. - When the request succeeds or fails, your code runs with
resultset totrueorfalse.
Considerations
- The answer is asynchronous. The action finishes before the app answers. Only your code knows the result.
- Errors in your code don't stop anything. The code is wrapped in a
try/catch. If it throws, the error is written to the browser console, starting withExecute CheckAutoSignerIsRunning Action Error. formis only available in forms. In listings, use other page elements instead ofform.fields.- Running isn't the same as ready. A
trueresult means the app answered. Signing can still fail, for example if the token isn't connected or the PIN is wrong.
Examples
To understand how to use the below examples, please see Running Examples.
1. Tell the user whether the app is running
This action checks the app and shows a message with the outcome.
{
"Title": "Check if PDF Auto Signer is running",
"ActionType": "PlantAnApp.PdfAutoSigner.CheckAutoSignerIsRunning",
"Description": "Check that PDF AutoSigner is running",
"Parameters": {
"JsCodeToExecute": "if (result) {\n alert('PDF AutoSigner is running. You can sign documents.');\n} else {\n alert('PDF AutoSigner is not running. Please start it and try again.');\n}"
}
}
2. Show the status on the page
This action writes the status to an HTML element with the ID SignerStatus, for example one placed in the form's layout. When the app is running, it also lists the signatures the app reported.
{
"Title": "Check if PDF Auto Signer is running",
"ActionType": "PlantAnApp.PdfAutoSigner.CheckAutoSignerIsRunning",
"Description": "Show PDF AutoSigner status",
"Parameters": {
"JsCodeToExecute": "var el = document.getElementById('SignerStatus');\nif (el) {\n el.textContent = result\n ? 'PDF AutoSigner is running. Signatures: ' + [].concat(responseOrError).join(', ')\n : 'PDF AutoSigner is not running.';\n}"
}
}
Revised 09/26/2026