Skip to main content
Version: 1.28 (Current)

Check PDF Signature

Audience: Low-code Engineers

Skill Prerequisites: Actions, Tokens, Conditions

Checks whether a PDF file has an electronic signature, and saves True or False in a token. Use the token in the conditions of the actions that follow.

The check is quick and structural. It reads the PDF's signature flags. It doesn't validate the signature, the certificate, or who signed the file.

note

This action requires the PDF feature to be licensed. It's part of the PDF Generator package (DnnSharp.PdfGenerator). If it isn't licensed, the action fails.

Typical Use Cases​

  • Check that an uploaded contract is signed before accepting the submission
  • Route signed and unsigned documents differently in a workflow
  • Confirm that a file produced by Sign PDF came back signed

Don't use it to​

  • Prove a signature is valid or trusted. The action doesn't check certificates, signature integrity, or whether the file changed after signing.
  • Find out who signed a file, or how many signatures it has.
  • Sign a file. Use Sign PDF instead.
Action NameDescription
Sign PDFSigns a PDF in a form using the PDF AutoSigner app on the user's computer.
Generate PDFCreates a PDF from an HTML template.
Merge PDFCombines several PDFs into one.
Extract PDFCopies selected pages of a PDF into a new PDF.
Throw ExceptionStops with an error, for example when the file isn't signed.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Source fileThe PDF to check. It can be a file ID, a relative URL, an absolute URL, a LinkClick URL, or a physical path, for example [ContractUpload:FileId] or [ContractUpload:RelativeUrl]. The file must be in the site's file system.Yesempty stringYes
Output Token NameThe name of the token that receives the result, without brackets, for example IsSigned. The value is True or False.Noempty stringYes

Output Parameters Reference​

TokenDescription
[<Output Token Name>]True if the PDF has an electronic signature, otherwise False. The values start with a capital letter.

How the check works​

The action opens the PDF read-only and looks at the SigFlags entry of its form (AcroForm):

What the file containsToken value
No form, or a form without SigFlagsFalse
SigFlags equal to 3 (signatures exist, and the file should only be changed by appending)True
SigFlags with any other valueNot set. See Considerations.
A file that can't be read as a PDF, for example a damaged or password-protected fileFalse

Signing tools normally set SigFlags to 3, so a signed PDF returns True.

Considerations​

  • A missing file is an error. If the file can't be found, the action fails with the error File '<Source file>' not found. A file that's found but can't be read returns False instead, and the details are written to the debug log.
  • The token may not be set. If the file has an unusual SigFlags value, the action doesn't write the token. Treat anything other than True as not signed, for example with the condition [IsSigned] != "True".
  • Compare with quotes. Token values are placed in conditions as text. Use [IsSigned] == "True", with a capital T. See Common Parameters.
  • Not a security check. A True result only means the file says it's signed. If you need a trusted signature, verify it with a dedicated signature validation tool.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Check an uploaded contract​

This action checks the file uploaded in the ContractUpload field and saves the result in [IsSigned].

{
"Title": "Check PDF Signature",
"ActionType": "CheckPdfSignature",
"Description": "Check whether the uploaded contract is signed",
"Parameters": {
"FileIdentifier": "[ContractUpload:FileId]",
"OutputTokenName": "IsSigned"
}
}

2. Reject unsigned contracts​

The first action checks the file. The second action stops with an error unless the result is True.

[
{
"Title": "Check PDF Signature",
"ActionType": "CheckPdfSignature",
"Description": "Check whether the uploaded contract is signed",
"Parameters": {
"FileIdentifier": "[ContractUpload:FileId]",
"OutputTokenName": "IsSigned"
}
},
{
"Title": "Throw Exception",
"ActionType": "ThrowException",
"Description": "Stop if the contract isn't signed",
"Condition": "[IsSigned] != \"True\"",
"Parameters": {
"AdminMessage": "Contract [ContractUpload] isn't signed (IsSigned = '[IsSigned]').",
"FriendlyMessage": "Please upload a signed copy of the contract."
}
}
]

Revised 09/26/2026