Skip to content
getnextpdf.com

Enterprise edition

Branding

The branding subsystem applies visible evaluation branding to generated PDFs during an evaluation and applies nothing under a paid license. It is delivered in the nextpdf/enterprise package, governs evaluation behavior across editions, and is driven entirely by the license — not by application code. For the end-to-end evaluation story, see Trial and Evaluation Branding; this page documents the branding subsystem itself.

This capability ships in NextPDF Enterprise (nextpdf/enterprise) and activates with an Enterprise-tier license envelope. A deployment without that entitlement does not load the capability’s classes. Compare editions and get a license.

Unlike most Enterprise surfaces it carries a dedicated capability code, enterprise.branding, because it governs evaluation behaviour across all editions — Core-only and Pro-only deployments included. The branding mode is resolved from the signed license envelope at runtime; no application flag selects it, and a paid license in any edition resolves to BrandingMode::None.

Terminal window
composer require nextpdf/enterprise:^3

The runtime has a branding mode with two states, modeled by BrandingMode:

  • None — no evaluation branding. Paid and normal output is never modified. This is the default.
  • EvaluationWatermark — visible evaluation branding is applied to generated PDFs.

BrandingStrategyFactory maps the mode to a strategy: NullBrandingStrategy for None (it performs no work and produces no modification) and EvaluationBrandingStrategy for EvaluationWatermark. The license state — not application code — selects the mode. A paid license never produces branded output, and there is no production build to switch and no code flag to flip.

This page describes runtime behavior only. It makes no warranty and no statement about eligibility or legal effect; the terms that apply to your evaluation or subscription are defined solely by your license agreement.

ConceptBehavior
BrandingModeTwo states: None (default, no modification) or EvaluationWatermark.
BrandingStrategyFactoryResolves a BrandingMode to a strategy.
EvaluationBrandingStrategyApplies the evaluation watermark and metadata decoration.
NullBrandingStrategyNo-op strategy for paid / normal output.
EvaluationBrandingConfigImmutable watermark text, metadata decoration, font size, gray level, and angle.
BrandingStrategyContract the integration layer consumes: isActive(), buildPageWatermark(), decorateProducer(), decorateSubject().
BrandingApplicatorApplies a resolved strategy to rendered PDF bytes; fail-closed — throws BrandingApplicationException when active branding cannot be marked.

The subsystem exposes a small callable surface for the integration layer that applies the strategy the license resolved; application code never chooses whether to brand. The samples below show the two touch points: reading a resolved strategy, and marking rendered bytes with the fail-closed applicator.

Resolve the strategy the license selected and read its behaviour. A paid license resolves to BrandingMode::None, whose strategy is inactive and passes every value through unchanged.

resolve-strategy.php
<?php
declare(strict_types=1);
use NextPDF\Enterprise\Branding\BrandingMode;
use NextPDF\Enterprise\Branding\BrandingStrategyFactory;
// The license resolves the mode; None is what a paid license produces.
$strategy = BrandingStrategyFactory::create(BrandingMode::None);
\var_dump($strategy->isActive()); // bool(false)
echo $strategy->decorateProducer('NextPDF 3.1'); // NextPDF 3.1 (unchanged)

Mark already-rendered PDF bytes with the strategy the license resolved. BrandingApplicator::apply() returns the input unchanged for a paid license and, for an evaluation license, appends the watermark and metadata markers while leaving the original bytes intact. It throws BrandingApplicationException when active branding cannot be safely applied — treat that as terminal and never commit the unmarked bytes.

apply-evaluation-branding.php
<?php
declare(strict_types=1);
use NextPDF\Enterprise\Branding\BrandingApplicationException;
use NextPDF\Enterprise\Branding\BrandingApplicator;
use NextPDF\Enterprise\Branding\BrandingMode;
use NextPDF\Enterprise\Branding\BrandingStrategyFactory;
use NextPDF\Enterprise\Branding\EvaluationBrandingConfig;
/**
* Apply the branding the license resolved to freshly rendered PDF bytes.
*
* @param string $renderedPdf Bytes from the render engine.
* @param BrandingMode $mode Resolved from the signed license envelope.
*
* @throws BrandingApplicationException When active branding cannot be marked.
*/
function markEvaluationOutput(string $renderedPdf, BrandingMode $mode): string
{
$strategy = BrandingStrategyFactory::create(
$mode,
new EvaluationBrandingConfig(
watermarkText: 'EVALUATION COPY — Not for Production Use',
),
);
try {
return (new BrandingApplicator())->apply($renderedPdf, $strategy);
} catch (BrandingApplicationException $e) {
// Fail-closed: never emit unbranded evaluation output. Dead-letter.
throw $e;
}
}

When the active license selects EvaluationWatermark, the evaluation strategy:

  • draws a light-gray diagonal watermark text on each page, rendered as a page content stream in an isolated graphics state so it does not alter surrounding content or your layout;
  • appends an evaluation suffix to the document’s producer metadata;
  • prepends an evaluation prefix to the document’s subject metadata.

The watermark uses a Base14 font and a rotation matrix to position the text diagonally across the page center. The configuration object is immutable and validates its inputs (for example, watermark text cannot be empty and font size must be positive).

Under a paid (non-evaluation) license the branding mode is None and the null strategy is selected: no watermark, no producer suffix, no subject prefix. Output is identical to output produced with no branding subsystem at all. Removing evaluation branding requires no code change — install a paid license and the next generated document is unbranded.

  • Branding appears when the license state is evaluation-style. This reflects the license state, not a defect; check license status and renew through the license portal.
  • The watermark is centered and diagonal by design so evaluation output is unambiguous; it is not intended to be tuned for production. A paid license removes it entirely.
  • Producer and subject metadata carry evaluation markers during an evaluation and are absent under a paid license.

The watermark is a small, fixed per-page content stream with negligible impact on generation time or document size. Under a paid license the subsystem performs no work. The page performance budget reflects documentation rendering.

Evaluation branding is a visibility marker, not a security control. It indicates evaluation output. It is not a digital signature and must not be relied on as one. For tamper-evident output, use the signing capabilities described in the feature matrix. The license that selects the branding mode is a signed envelope whose issuer signature the runtime verifies.

The branding subsystem adds a fixed watermark and metadata markers; it does not read or transmit document content and makes no network calls.

The subsystem does not log document content. License-state transitions that change the branding mode are surfaced through the licensing subsystem, not here.

No standards conformance is claimed for this page. It describes runtime behavior only. It does not state or imply any warranty, certification, or eligibility. The terms of your evaluation or subscription are defined solely by your license agreement.

This module performs no cryptographic operations. License signature verification is handled by the licensing subsystem.

The branding subsystem itself processes no external input beyond the resolved branding mode. The license envelope that selects the mode is signed and its issuer signature is verified by the runtime; spoofing the mode would require forging that signature.

  • BrandingMode has two states: None (default; no modification of output) and EvaluationWatermark.
  • Under a paid (non-evaluation) license the mode is None and the null strategy is selected: output is identical to output produced with no branding subsystem at all.
  • Under an evaluation license the strategy draws a diagonal watermark in an isolated graphics state and appends evaluation markers to producer and subject metadata.
  • The configuration object is immutable and validates its inputs (watermark text non-empty, font size positive).

This page documents externally observable behavior and the supported public API surface only. Internal namespace paths, helper classes, mechanism tables, runbook filenames, and ticket prefixes are out of scope.

The branding subsystem ships in the nextpdf/enterprise package but governs evaluation behavior across all editions, including Core- and Pro-only deployments that use an evaluation license. There is no Core-only branding subsystem to fall back to; a paid license in any edition resolves to BrandingMode::None.

There is no separate Pro branding subsystem. The same nextpdf/enterprise branding subsystem governs evaluation behavior for Pro deployments; a paid Pro license resolves to BrandingMode::None exactly as a paid Enterprise license does.

Internal mechanism detail stays in the source repository’s internal documentation and is out of scope for this manual.

The license envelope that selects the branding mode is a signed artifact whose issuer signature the runtime verifies; license provisioning, renewal, and secure storage of the license are the operator’s responsibility. The subsystem makes no network calls and reads no document content.

This page describes runtime behavior only. It does not state or imply any warranty, certification, or eligibility, and it does not constitute legal advice. The terms of your evaluation or subscription — including what branding applies and for how long — are defined solely by your license agreement. Consult that agreement or contact sales.