Embed Evidence.
Learn more
High‑Fidelity
Document Viewer
for RAG Apps
High‑Fidelity Document Viewer
for RAG Apps
Render the original file inside your product, whatever PDF, DOCX, PPTX, XLSX it is.
Highlight exactly the passages your LLM retrieved, no more guessing where the answer came from.
Render the original file inside your product,
whatever PDF, DOCX, PPTX, XLSX it is.
Highlight exactly the passages your LLM retrieved,
no more guessing where the answer came from.
Try it now
Stop sending users to external viewers
If users can’t see the exact evidence behind an LLM answer, they won’t trust it.
Screenshots? Out‑of‑sync. Raw text? Missing layout.
You can now provide the authentic visual context.
Screenshots? Out‑of‑sync. Raw text? Missing layout.
You can now provide the authentic visual context.
Stop sending users to external viewers
If users can’t see the exact evidence behind an LLM answer, they won’t trust it.
Screenshots? Out‑of‑sync. Raw text? Missing layout.
You can now provide the authentic visual context.
Screenshots? Out‑of‑sync. Raw text? Missing layout.
You can now provide the authentic visual context.

Multi‑Format
Renders PDFs and Office docs natively with a headless conversion pipeline under the hood. Your users always see the original page layout.

Precise Highlights
Pass chunks from your RAG pipeline and the viewer will auto‑scroll and spotlight the evidence. The highlight logic is completely in your hands, from chunks to pages, with no fragile text search.

Embed in Seconds
Generate a self‑contained HTML bundle to be embedded into an iframe. Works in React, Vue, Django, Flask, FastAPI… anywhere a browser lives.

Lightweight & Secure
No external servers. The viewer runs fully in the browser and serves files from your backend with your access permission logic.
Less boilerplate,
more product.
Add trustworthy document evidence to your RAG app in a few lines of code.
View on GitHubBuilt to Pair with Preprocess.
Python
from pypreprocess import Preprocess from rag_document_viewer import RAG_DV # Preprocess a file preprocess = Preprocess( api_key="YOUR_API_KEY", filepath="path/to/file", boundary_boxes=True ) preprocess.chunk() preprocess.wait() result = preprocess.result() # Generate an HTML viewer with highlighting capabilities RAG_DV( file_path="path/to/file", store_path="/path/to/viewers/doc1", chunks=result.data["boundary_boxes"]["boxes"] )