
Working with PDF Viewer – High‑Quality Rendering for PDF Files in ASP.NET and .NET Core Apps with Full Search and Interaction: A Practical Guide
Need server-rendered PDF viewing, text-layer search, and optional annotations in an ASP.NET or ASP.NET Core web app? Doconut provides those capabilities through its Viewer and released plugins. Its server‑side rendering model keeps document processing within your application infrastructure. You can request a 30-day temporary evaluation license and test the viewer and required plugins before purchase.
In this guide we’ll walk senior developers and architects through a practical integration approach and show how to add text-layer search and annotation while keeping document rendering in their own infrastructure.

1. Wiring the Doconut PDF Viewer into an ASP.NET Core Project
First things first: connect the viewer to the ASP.NET Core request pipeline. Add the required package and configure the application services according to the version of the SDK used by your project. Consult the current Doconut documentation for the exact registration steps.
Inside a controller or service, coordinate document sessions through the Viewer class and the caching and HTTP services provided by ASP.NET Core. The viewer can then supply the front end with the session information required to request pages, thumbnails, and annotation data. Keep the integration behind an application service so SDK‑specific details remain isolated from controllers and UI code.
Because the heavy lifting stays on the server, the client only receives lightweight image streams—fast load times even on modest browsers.
2. Rendering Accuracy in .NET – Why Doconut’s PDF Viewer Looks Better
When a PDF contains complex vector graphics, embedded fonts, or high‑resolution images, many generic viewers fall back to low‑quality rasterisation. Doconut’s rendering engine, however, processes each page with a dedicated rasterizer that respects the original PDF’s colour space, transparency groups, and font‑hinting.
- Vector‑to‑pixel fidelity – The engine translates vector objects into anti‑aliased bitmap tiles at the requested DPI, preserving line weight and curve smoothness.
- Embedded font handling – Fonts are extracted from the PDF and rendered locally, eliminating the “fallback font” problem that plagues HTML‑based viewers.
- Colour‑management awareness – CMYK and spot colours are honoured, which matters a lot for legal‑tech and financial reporting where exact colour reproduction is a must.
If you need a thumbnail for a document list, call the viewer’s thumbnail‑dimension API to retrieve the width, height and zoom settings for a specific page. You can then embed those dimensions in an <img> tag, letting you build a responsive gallery that scales with the user’s device pixel ratio. Since the rendering pipeline runs on the server, you can off‑load the CPU work to a background job or a scaled‑out service without hurting front‑end latency.
3. Search – Finding Text Already Present in PDFs
Doconut’s Search Plugin finds text in a document’s existing text layer. Scanned or image-only PDFs require an external OCR process before their text can be searched.
3.1 Confirming that a text layer is available
Before enabling Search, confirm that the PDF already contains searchable text. Doconut processes the document within your infrastructure, but the surrounding application remains responsible for access controls and compliance obligations.
3.2 Searching across the document
The front‑end sends a simple query string to a dedicated endpoint. Doconut looks up the pre‑generated text layer and returns matching page numbers and highlighted snippets. Search performance depends on the document, server resources, and deployment configuration. The JSON payload includes the page index, exact coordinates of each match, and surrounding context, so you can overlay highlight boxes right on the rendered page image.
3.3 Benefits for enterprise workflows
- Reduced manual effort – Users locate clauses in contracts or line items in financial statements without opening a separate editor.
- Application audit logs – The surrounding application can log search requests if it needs a record of who accessed which information.
- Scalable architecture – size the Search workload with realistic documents, and perform any required OCR outside Doconut.
4. Interactive Annotations: Review, Comment, and Approve PDFs Inside Your App
Document review cycles often get stuck because people have to download a PDF, annotate it offline, then re‑upload the revised version. Doconut’s Annotation Plugin brings the whole review loop into the browser, while keeping the heavy annotation logic on the server for reliability and security.
4.1 Creating an annotation manager
When a page is requested, obtain an annotation manager that knows the page’s dimensions. The manager lets you add any of the supported annotation types—highlight, sticky note, drawing, or a custom stamp. For example, you can drop an “Approved” stamp onto a specific spot by specifying its coordinates, size and image path.
The manager serialises the annotation collection to XML, which you can store alongside the document or send back to the client for immediate visual feedback.
4.2 Persisting and loading annotations
Store and reload annotations through the supported plugin integration. Doconut provides review markup but does not edit the underlying PDF content.
4.3 Enterprise‑grade interaction
- Role‑based visibility – Because annotations are stored separately, you can filter them per user role (e.g., reviewers see comments, approvers see stamps).
- Application-owned logging – The surrounding application can record relevant annotation actions, but Doconut does not provide an audit trail or guarantee compliance.
- No client‑side plugins – All interactions happen through standard HTTP calls; no need for ActiveX, Flash, or proprietary browser extensions.
5. Watermarking and Application-Level Delivery Controls
Many enterprises define printing policies for confidential documents. Doconut supports custom watermarks on rendered pages, while print permissions, quotas, and related controls must be implemented by the surrounding application.
Apply a documented custom watermark when needed and enforce any printing workflow through application-owned authorization and delivery logic. Because the processing occurs server‑side, you retain full control over the output, and the client never sees the original, unrestricted file.
Key Takeaways
- ASP.NET Core integration connects the PDF viewer to the application request pipeline while keeping SDK‑specific setup isolated.
- High‑fidelity rendering preserves vector graphics, embedded fonts, and colour accuracy, delivering a professional viewer experience.
- Text-layer search finds text already present in supported documents; scanned pages require external OCR.
- Annotation Plugin adds review markup; the surrounding application owns authorization, persistence, integrity controls, and audit logging.
- Custom watermarks can mark rendered pages, while the application owns printing and compliance controls.
- All operations work with streams, background jobs, and web APIs, making the viewer suitable for large‑scale, document‑centric applications.
Ready to Upgrade Your ASP.NET/.NET Core Apps?
Evaluate Doconut’s server-side PDF Viewer with optional Search and Annotation plugins in your own .NET application. Request a 30-day temporary evaluation license and test the viewer and required plugins with representative PDFs.