What DocViewKit is

DocViewKit adds lightweight, read-only previews to everyday OA attachments and enterprise apps. Quick integration uses one Viewer component, with on-demand formats and no conversion server.

Can I use it for everyday OA attachments?

Yes. OA attachments, approvals, admin portals, CRM/ERP records, and cloud drives are primary use cases. The same Viewer also serves enterprise SaaS, AI knowledge bases, legal review, and financial audit. A basic preview needs neither Engine API integration nor an Office server. Search and source location are available when the workflow needs them.

Deliberate boundary

DocViewKit does not provide document editing, collaboration, OCR, RAG, embeddings, model calls, or AI answers. AI knowledge-base and document-Q&A products are target integrations, not features inside the SDK.

What makes integration quick and lightweight?

Verified integration factWhat it meansBoundary
1 Viewer componentImport, mount, and call open(file): three UI integration steps.Production still needs static assets, host authorization, and compatibility checks.
4 input typesFile, Blob, ArrayBuffer, and Uint8Array use the same open() method.A remote URL is fetched by the host, not passed directly to open().
0 conversion servicesParsing and rendering run in the frontend.The application still serves assets and controls document access.
On-demand format packsUnused optional parsers stay out of the initial download.Download size varies by version and format; measure bytes transferred, not only npm archive size.

Do private attachments leave my application?

  • Document bytes stay in the host frontend during normal viewing.
  • The host does not need to operate a document-conversion cluster.
  • JS, Worker, Wasm, fonts, and codecs can be self-hosted with the application.
  • Macros, scripts, launch actions, and active external content are not executed.

No third-party upload is required. Your host authorizes and fetches the attachment before passing its bytes to open(). Private URLs do not need to become public. Same-origin cookies, cross-origin CORS rules, and server-side permission checks remain the host responsibility.

How do I verify fidelity and first-open speed?

Use your actual documents. Check fonts, line wrapping, pagination, tables, charts, search, and diagnostics. Support for a file extension does not imply identical rendering of every feature. Read-only viewing does not include editing, co-editing, or AI answers.

For speed, record the release version, file bytes and page count, browser, device, fonts, network, and cold versus warm cache. Measure transferred bytes and time to first visible content separately from complete-document processing. No single duration applies to every file or device.

Viewer or Engine API?

ArtifactAccessPurpose
@docviewkit/viewerApache-2.0Framework-independent Viewer with every supported format.
@docviewkit/viewer/engineApache-2.0Engine APIs for custom rendering and source-object access.

Use the ready-made Viewer for embedded previews or the Engine API for custom document experiences. Both include UI customization, minimal mode and watermarks without runtime licenses or mandatory branding. Optional services cover support, customization and enterprise delivery.