Skip to content

Repository files navigation

iSafePDF

Note: This is a legacy project originally written in 2018. It uses older libraries, including a bundled LGPL copy of iTextSharp (v4.1.6) that is compatible with the code. The iTextSharp LGPL edition has since been superseded by iText 7+ under a different license. This repository is preserved as-is for reference and archival purposes.

A Windows desktop application for digitally signing, encrypting, and managing metadata of PDF documents. Built with .NET Framework and iTextSharp.

LicensePlatformFramework

Features

Digital Signatures

  • Sign PDFs with PKCS#7 detached signatures using X.509 certificates
  • Load certificates from the Windows Certificate Store or from .pfx / .p12 files
  • Visual signature placement — drag and resize the signature on a page preview
  • Custom signature text, contact, reason, and location fields
  • Optional signature image overlay
  • Multi-signature support — add signatures without invalidating existing ones

Timestamping (TSA)

  • RFC 3161 timestamp authority support
  • Authenticated TSA connections (login/password)
  • Automatic OCSP response embedding when a full certificate chain is available

Encryption

  • Password-based PDF encryption (user and owner passwords)
  • Granular permission control:
    • Printing / Degraded printing
    • Copy content
    • Modify content / Modify annotations
    • Fill in forms
    • Document assembly
    • Screen readers accessibility

Metadata Editing

  • Read and write standard PDF metadata fields (Author, Title, Subject, Keywords, Creator, Producer)
  • XMP metadata support

Building

Prerequisites

  • Visual Studio 2017 or later
  • .NET Framework 4.8 SDK

Build

  1. Open iSafePDF.sln in Visual Studio
  2. Build the solution (Ctrl+Shift+B)

The solution contains three projects:

ProjectDescription
iSafePDFMain WinForms application
bccryptoBouncy Castle cryptography library
itextsharpiTextSharp LGPL PDF library (v4.1.6)

Usage

  1. Document tab — Select an input PDF and an output path. If the PDF is password-protected, you'll be prompted for the password. Existing metadata is loaded automatically for editing.
  2. Signature tab — Click "Select Certificate" to choose a signing certificate. Configure the signature appearance, position, and optional TSA timestamping.
  3. Encryption tab — Optionally enable encryption with user/owner passwords and set document permissions.
  4. Click Process to generate the signed/encrypted PDF.

Architecture

Form1 (Main UI)
|
|-- Cert Certificate & private key wrapper (Bouncy Castle PKCS#12)
|-- MetaData PDF metadata holder with XMP serialization
|-- PDFSignatureAP Signature appearance properties
|-- PDFEncryption Encryption config & permission flags
|-- PDFSigner Core signing engine (iTextSharp PdfStamper + PdfPKCS7)
|
|-- CertificateDialog Certificate selection (store + file browse)
|-- PwdDialog Password prompt for encrypted PDFs
|-- PickBox Visual drag/resize handles for signature placement

Dependencies

License

This project is licensed under the GNU Lesser General Public License v2.1.

Author

Alaa-eddine KADDOURI@alaa-eddine

About

iSafePDF is a .Net PDF Signature application using iTextSharp

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages