PdfForge.Core 1.1.1 License Info
PdfForge.Core
1.1.1
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 - License at pdfforge.io/buy")
- 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 - License at pdfforge.io/buy" | 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 - License at pdfforge.io/buy"
โ ๏ธ 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
- ๐ Docs: See
docs/13-licensing-tiers-enforcement.md
๐ Version History
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-06-10 | Initial perpetual licensing implementation |
โ 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.