@doc-preview/enterprise
v1.1.2
Published
Enterprise licensing and gated preview features for Doc Preview.
Maintainers
Readme
@doc-preview/enterprise
Enterprise licensing and gated preview features for Doc Preview. JSON licence keys unlock annotations, watermark, split view, password PDF, print, in-document search, redaction, and document diff.
Current release: 1.1.2 — Depends on @doc-preview/core ^1.1.2. See CHANGELOG.
Repository: github.com/rajkishorsahu89/doc-preview
Demo: doc-preview-app.vercel.app — tool · demo · Enterprise guide
Keywords: doc-preview enterprise licensing annotations watermark split-view redaction
Install
npm install @doc-preview/enterpriseRequires @doc-preview/core and a framework adapter (react, angular, or js).
Supported file types
Enterprise modules apply on top of Community + Office previews (same file types as @doc-preview/core and optional @doc-preview/office):
| Category | Extensions |
| --- | --- |
| PDF | .pdf — annotations, search, redaction, password, print, native split diff |
| Images | .png, .jpg, .jpeg, .gif, .webp, .bmp, .svg, .tif, .tiff — signatures, rotate |
| Word | .docx, .docm, .dotx, .odt — search; native split diff (DOCX/ODT pairs) |
| Excel | .xlsx, .xlsm, .xltx, .xls, .ods — search; native split diff (cell highlights) |
| PowerPoint | .pptx, .pptm, .potx, .ppt, .odp — search; native split diff (PPTX pairs) |
| CSV / TSV, text, HTML, JSON, XML | .csv, .tsv, .txt, .md, .html, .htm, .json, .xml, .log — compare / line diff |
| Legacy Word / PowerPoint | .doc, .ppt — compare (text extraction) |
| Video / audio | .mp4, .webm, .mov, .mp3, .wav, .m4a — metadata compare |
Full extension list: see @doc-preview/core README.
Usage — licence key on host
<DocPreview
documents={docs}
enterpriseLicenseKey="YOUR-LICENSE-KEY"
config={{
enterprise: {
watermarkText: "CONFIDENTIAL",
enableAnnotations: true,
enablePrint: true,
enableSearch: true,
enableRedaction: true,
splitView: true,
splitDiffView: true,
diffView: true
}
}}
/>Usage — programmatic registration
import {
registerEnterpriseLicenseFromPredefinedKey,
getEnterpriseFeatureFlags,
clearEnterpriseLicense
} from "@doc-preview/enterprise";
registerEnterpriseLicenseFromPredefinedKey("YOUR-LICENSE-KEY");
const flags = getEnterpriseFeatureFlags();
// flags.canAnnotations, canWatermark, canSplitView, …Angular helpers (re-exported from @doc-preview/angular):
import { syncEnterpriseLicenseFromKey, toPreviewEnterpriseFlags } from "@doc-preview/angular";Licence modules
| Module key | Feature |
| --- | --- |
| annotations | PDF highlight, note, draw, signature; image signatures |
| watermark | Diagonal document watermark |
| split-view | Side-by-side synced scroll |
| password-pdf | Password unlock modal |
| print-with-watermark | Print with optional watermark |
| search-in-document | PDF and DOCX search |
| redaction | PDF black-box redaction |
| document-diff | Compare modal + inline split diff |
Demo key
Documentation and local testing only:
DP-ENT-DEMO-0001-ANNOTATIONS-SPLITRelated packages
License
MIT — licence keys are commercial; demo keys ship for documentation only.
