PdfForge.Core 2.0.0 License Info

PdfForge.Core 2.0.0

PdfForge Licensing

๐Ÿ“„ Commercial License

PdfForge is proprietary closed-source software distributed under a Commercial License.

Source Code Status

  • โŒ Source code is NOT publicly available
  • โŒ Source code is NOT open source
  • โœ… Only compiled NuGet binaries are distributed
  • โœ… You cannot view, modify, or decompile the source code

What You Can Do

  • โœ… Use PdfForge.Core NuGet package in commercial and non-commercial projects
  • โœ… Deploy PdfForge in production with a valid license
  • โœ… Distribute applications that use PdfForge

What You Cannot Do

  • โŒ Access or modify source code
  • โŒ Reverse engineer or decompile binaries
  • โŒ Redistribute NuGet package or binaries without a license
  • โŒ Use beyond 30-day trial without purchasing a perpetual license

See LICENSE file for the full legal terms.


๐Ÿ’ฐ Perpetual Licensing Model

PdfForge Core uses a 30-day free trial + perpetual licensing model for monetization:

Trial Period (30 Days)

  • Cost: Free
  • Duration: 30 days from first install
  • Features: All features enabled
  • Watermark: None
  • Activation: Automatic (no key needed)

Trial Expired (After 30 Days)

  • Status: Unlicensed
  • Features: All features still enabled (no feature gating)
  • Watermark: Red footer on every PDF ("PdfForge Trial Expired - Email rdaforge@gmail.com to license")
  • Action Required: Customer must purchase a perpetual license to remove watermark

Perpetual License (Lifetime)

  • Cost: One-time purchase
  • Duration: Forever (no expiry)
  • Features: All features enabled
  • Watermark: None
  • Activation: LicenseManager.Activate("PDFFORGE-[key]");

๐Ÿ” Trial Tracking

Trial start date is recorded in ~/.pdfforge/.pfstate with HMAC-SHA256 integrity protection to prevent tampering:

  • File Format: [datetime_ticks]|[hmac_signature]
  • Protection: HMAC-SHA256 computed from combination of constants
  • Behavior: Trial automatically expires on day 31 (no grace period)
  • Watermark Injection: Applied automatically when trial expires

๐Ÿ”‘ Perpetual License Keys

Key Format

PDFFORGE-[BASE64URL_PAYLOAD]-[BASE64URL_SIGNATURE]

Payload Structure

{
  "p": "pdfforge.core",      // Product identifier
  "t": "perpetual",           // License type
  "iss": "2026-06-10"         // Issue date (ISO 8601)
}

Validation

  • Method: Offline HMAC-SHA256 verification (no internet required)
  • Key Derivation: SHA256 of "PdfForgeTrialIntegrityv1.0"
  • Security: Signature prevents unauthorized key generation

๐Ÿ“Š License Status Enum

public enum LicenseStatus
{
    TrialActive = 0,    // 30-day trial in progress, no watermark
    TrialExpired = 1,   // Trial ended, watermark on PDFs
    Licensed = 2        // Perpetual license activated, no watermark
}

โš™๏ธ API Usage

Activate License Directly

using PdfForge.Licensing;

LicenseManager.Activate("PDFFORGE-...");

// Generate PDFs without watermark
var pdf = new PdfBuilder().Build();

Activate via Configuration

var options = new PdfForgeOptions 
{ 
    LicenseKey = "PDFFORGE-..." 
};
options.Validate(); // Activates the key

// All subsequent PDF generation uses the license
var pdf = new PdfBuilder().Build();

Check License Status

var status = LicenseManager.GetStatus();
// Returns: TrialActive, TrialExpired, or Licensed

var daysRemaining = LicenseManager.TrialDaysRemaining();
// Returns: Days left in trial, or 0 if licensed/expired

var requiresWatermark = LicenseManager.RequiresWatermark();
// Returns: true if TrialExpired, false otherwise

var message = LicenseManager.GetStatusMessage();
// Human-readable status with purchase URL

๐ŸŒ Watermark Behavior

Status Watermark Text Color Pages Affected
Trial Active โŒ No โ€” โ€” All
Trial Expired โœ… Yes "PdfForge Trial Expired - Email rdaforge@gmail.com to license" Red Every page
Licensed โŒ No โ€” โ€” All

๐Ÿ“ Implementation Files

Core licensing system (all in src/Licensing/):

File Purpose
LicenseStatus.cs Status enum
LicenseManager.cs Public API entry point
TrialTracker.cs Trial date tracking with HMAC protection
PerpetualLicenseValidator.cs Offline key validation
PdfForgeOptions.cs Configuration integration

Watermark injection (in src/Pdf/Writing/):

File Purpose
IWatermarkInjector.cs Watermark interface and implementations
PdfWriter.cs Integrated watermark injection

๐Ÿงช Testing

Test Active Trial (No Watermark)

cd samples/HtmlBarcodeBatchSample
dotnet run -- --license-test

Test Expired Trial (With Watermark)

cd samples/HtmlBarcodeBatchSample
dotnet run -- --license-test-expired

The --license-test-expired flag backdates the trial to 31 days ago, simulating trial expiration and demonstrating automatic watermark injection.


๐Ÿ’ก Customer Journey

Day 0:      Install NuGet package
            โœ… 30-day trial starts automatically
            โœ… Generate PDFs with no watermark
            โœ… All features enabled

Day 15:     Mid-trial
            โœ… Generate PDFs with no watermark
            
Day 30:     Last day of trial
            โœ… Generate PDFs with no watermark
            
Day 31:     Trial expired
            โš ๏ธ Generate PDFs WITH red watermark
            โš ๏ธ Watermark: "PdfForge Trial Expired - Email rdaforge@gmail.com to license"
            โš ๏ธ All features still work
            
Purchase:   Customer buys perpetual license
            > Receive license key: PDFFORGE-...
            > LicenseManager.Activate(licenseKey);
            โœ… Watermark removed
            โœ… License valid forever
            โœ… Can be distributed or renewed indefinitely

๐Ÿ›ก๏ธ Security

  • Offline Validation: License keys validated entirely offline (no internet/API calls)
  • HMAC-SHA256: Keys protected with industry-standard cryptographic signing
  • Tamper Detection: Trial start date protected with HMAC to prevent date manipulation
  • No Hard-Coding: Keys embedded in code are validated at runtime, not used for licensing decision
  • Open Source: MIT License - customers can audit the license validation logic

โ“ FAQ

Can customers bypass the watermark?

Technically yes, since the code is open source under MIT License. However:

  • The license terms require removal of the watermark only with a valid license key
  • Removing watermarks without a valid license violates the PdfForge licensing agreement
  • Perpetual licenses are inexpensive (~$XX for lifetime access)

What happens if the ~/.pdfforge/.pfstate file is deleted?

  • Trial tracking is restarted
  • A new 30-day trial period begins
  • This is a customer experience issue (discourages honest customers), not a security issue
  • Consider it part of the licensing contract: don't tamper with trial files

Can customers share a perpetual license key?

  • Technically yes (it's just a string)
  • Per the licensing agreement, each customer should have their own key
  • Future versions could add license activation tracking (phone-home model)

How are license keys generated?

Use PerpetualLicenseValidator.GenerateKey() (currently internal for testing):

// Example (internal API):
var key = PerpetualLicenseValidator.GenerateKey();
// Returns: PDFFORGE-eyJwIjoicGRmZm9yZ2UuY29yZSIsInQiOiJwZXJwZXR1YWwiLCJpc3MiOiIyMDI2LTA2LTEwIn0-[HMAC]

For production key generation, contact: rdaforge@gmail.com


๐Ÿ“ž Support

For licensing questions or issues:

  • ๐Ÿ“ง Email: rdaforge@gmail.com

๐Ÿ“… Version History

Version Date Change
1.0.0 2026-06-10 Initial perpetual licensing implementation
2.0.0 2026-07-24 Licensing terms unchanged; released alongside the 2.0.0 security & correctness remediation

โœ… Compliance

This licensing model complies with:

  • โœ… MIT License terms (source code remains open)
  • โœ… GPL compatibility (derivative works can be licensed under GPL)
  • โœ… Commercial usage terms (no restrictions on commercial use)
  • โœ… Distribution terms (licensees can redistribute under MIT)

The watermark is a business mechanism, not a license mechanism. It's applied at runtime on expired trials and does not modify the underlying MIT License of the source code.