A lightweight ASP.NET Core sample that demonstrates how to sign, secure, and validate PDF documents using the Syncfusion .NET PDF Library. The application allows users to apply digital signatures, encrypt PDF files, configure document permissions, and retrieve signature details from signed PDFs.
| Page | Route | Description |
|---|---|---|
| Home | / |
Landing page with links to both demo pages. |
| Sign & Secure | /Signature/Sign |
Upload (or use the default) PDF, PFX, signature image, then sign + apply encryption/permissions and download. |
| Validate | /Signature/Validate |
Upload (or use the default) signed PDF, view signer certificate and signature info. |
- Visible signature image overlay on the last page
- Invisible digital signature (PKCS#7 / CAdES, SHA-256)
- AES-256 encryption with an open password
- Disable printing / copying / editing
- Flatten AcroForm fields
- Read-back of signature + signer certificate details
PdfDigitalSignatureAndSecurityDemo
├── Controllers
│ ├── HomeController.cs
│ └── SignatureController.cs
├── Models
│ ├── SignPdfViewModel.cs
│ └── ValidateSignatureViewModel.cs
├── Services
│ ├── PdfSecurityService.cs
│ └── PdfValidationService.cs
├── Views
│ ├── Home
│ │ └── Index.cshtml
│ ├── Signature
│ │ ├── Sign.cshtml
│ │ └── Validate.cshtml
│ └── Shared
│ └── _Layout.cshtml
├── wwwroot
│ └── SampleFiles
│ ├── Input.pdf
│ ├── SignedDocument.pdf
│ ├── Signature.png
│ └── Certificate.pfx
├── Properties
│ └── launchSettings.json
├── Program.cs
├── appsettings.json
└── PdfDigitalSignatureAndSecurityDemo.csproj
cd PdfDigitalSignatureAndSecurityDemo
dotnet restore
dotnet runThen open https://localhost:5001 (or http://localhost:5000).
Set your Syncfusion license key via:
- Environment variable
SYNCFUSION_LICENSE_KEY, or appsettings.json→Syncfusion:LicenseKey, or- The
SyncfusionLicenseProvider.RegisterLicense(...)call inProgram.cs.
A free community license is available at https://www.syncfusion.com/products/communitylicense.
| File | Default password (when none supplied in UI) |
|---|---|
Certificate.pfx |
syncfusion |
Replace the bundled Input.pdf, Signature.png, Certificate.pfx, and
SignedDocument.pdf with your own files to try the demo end-to-end.