
Integrating Document Viewer SDKs with Cloud Storage and Collaboration Platforms

Why Cloud‑Native Document Viewing Matters for Modern .NET Apps
Cross‑platform consistency with a single .NET core
Enterprises are moving away from desktop‑only document tools and embracing web‑first experiences that run on Windows. Doconut’s server‑side rendering engine runs on .NET 6 and later, ensuring the same pixel‑perfect output regardless of the underlying OS. Because the viewer works with streams, you can pull a file from any cloud bucket, feed it directly to the Doconut viewer component, and return rendered pages or thumbnails to the client without ever writing the file to disk.
Reducing latency and bandwidth
When a document lives in Azure Blob Storage, downloading the entire file to the client just to view the first page creates unnecessary latency. Doconut supports on‑demand thumbnail generation, allowing you to request a low‑resolution preview first and fetch the full‑page render only when the user scrolls. This pattern is especially valuable for large CAD drawings (DWG, DXF) that can be hundreds of megabytes.
Security‑first processing
All heavy lifting stays on the server. By using Doconut’s server‑side processing capabilities, you keep confidential PDFs, legal contracts, or medical records inside your private VNet or behind a corporate firewall. No third‑party SaaS is called, and the viewer never streams raw bytes to a browser‑side engine—only image tiles or HTML snippets that you generate behind the scenes.
Connecting Doconut to Popular Cloud Storage Services
General integration approach
- Obtain the document stream – Use the SDK of your chosen cloud provider (Azure Blob, Amazon S3, Google Cloud Storage) to download the file into a
Streamobject. - Pass the stream to Doconut – The Doconut viewer accepts a stream together with optional rendering options. This eliminates the need for temporary files on the web server.
- Generate a viewer token – Doconut returns a token that uniquely identifies the opened document for the current session. The token can be returned to the front‑end as JSON and used for subsequent page‑render or annotation requests.
- Render pages on demand – The front‑end calls the Doconut endpoint with the token and the desired page number; Doconut streams back an image or HTML fragment.
Because the workflow relies only on streams, swapping Azure code for Amazon S3 or Google Cloud Storage requires only a change in the cloud‑SDK call that creates the stream; the rest of the Doconut pipeline remains identical.
Handling multi‑tenant storage
In a SaaS DMS, each tenant may have a separate bucket or prefix. Since Doconut works with streams, you can resolve the correct bucket at runtime, open the document, and keep the token scoped to the current user’s claims. Doconut’s internal caching (IDistributedCache) can be configured to use Redis or Azure Cache for Redis, ensuring that repeated requests for the same page hit memory rather than re‑rendering.
Enabling Real‑Time Annotation and OCR within Collaborative Workflows
Annotation plugin: turning a static viewer into a review hub
Doconut ships with an Annotation Plugin that lets users highlight text, add sticky notes, or draw free‑hand shapes. After a document is opened, you obtain an annotation manager from the viewer, add or modify annotation objects, and persist the annotation state as XML. Storing the XML alongside the document record enables versioned review histories, and loading the XML on subsequent opens restores the exact visual state.
OCR‑powered search for scanned PDFs
Scanned contracts, receipts, or medical images often arrive as image‑only PDFs. Doconut’s Search Plugin automatically runs OCR on the server when you enable it in the viewer configuration. The OCR engine lives inside the server‑side stack, so the extracted text never leaves your protected environment. Once OCR is complete, you can call the search API to retrieve matching page numbers and bounding rectangles, which the UI can highlight. Because the OCR runs on the server, you can also index the extracted text into Azure Cognitive Search, Elasticsearch, or any other search service to provide instant full‑text search across your entire repository.
Collaboration through shared tokens
In Teams or SharePoint integrations, you typically generate a short‑lived token that encodes the document ID, user permissions, and a timestamp. Doconut’s token string returned from the OpenDocument call can be wrapped in a JWT or stored in a cache entry. When another user clicks the shared link, the same token is used to re‑hydrate the viewer, preserving annotations and OCR layers for everyone involved.
Secure Server‑Side Conversion and Controlled Printing with Doconut
Many enterprises need to convert incoming Word, Excel, or CAD files into PDF for archiving, or to enforce a “print‑only‑if‑approved” policy. Doconut’s Converter Plugin handles these scenarios without requiring Microsoft Office or third‑party services. You invoke the conversion API on the server, passing the source file path (or stream) and the desired output format. The conversion runs entirely on the back‑end, producing a PDF that can be stored in your document repository.
Once the PDF exists, you can enable Controlled Printing directly in the viewer UI. Doconut exposes a method to set print permissions for a given document token. When the user clicks the print button, Doconut checks the flag and either renders a printable image stream or returns a friendly “printing disabled” message. This approach eliminates the need for custom JavaScript to block the browser’s print dialog.
Auditing print activity
Because the print request travels through the Doconut middleware, you can hook into ASP.NET Core’s logging pipeline to capture who printed what and when. Store the audit entry in a SQL table or forward it to a SIEM system for compliance reporting—critical for legal tech or healthcare solutions where every document access must be traceable.
Best Practices for Scaling and Performance in Cross‑Platform Environments
- Leverage distributed caching – Doconut’s internal page‑tile cache can be backed by Redis, Azure Cache, or any
IDistributedCacheimplementation. Include the document version hash in cache keys to avoid serving stale images after a conversion. - Use background jobs for bulk conversion – When onboarding a large archive, enqueue conversion tasks with Hangfire or Azure Functions. The Doconut viewer class works with
IHostedServiceworkers because it accepts streams and returns tokens without requiring an HTTP context. - Tune image resolution per device – Mobile devices benefit from a lower
ImageResolution(150‑200 DPI), while desktop workstations can request 300 DPI for CAD detail. Adjust the resolution based on the user‑agent string or a client‑side setting. - Enable lazy loading of annotations – Store annotation XML in a separate table and load it only when the user opens the annotation pane. This reduces the initial payload and speeds up first‑page rendering.
- Monitor memory footprints – Rendering high‑resolution CAD pages can be memory intensive. Configure the .NET GC to use server mode in production (
<gcServer enabled="true"/>) and set a reasonable timeout to prevent runaway rendering jobs. - Apply a CDN for static assets – The viewer’s JavaScript and CSS bundles are static. Serve them from Azure CDN, CloudFront, or Cloudflare to shave milliseconds off the initial page load, especially for globally distributed teams.
By following these guidelines, you can support thousands of concurrent users across continents while keeping latency under 200 ms for the first page—a benchmark many enterprise portals aim for.
Getting Started Quickly with Doconut’s Free Trial
The fastest way to evaluate Doconut is to download the free trial from the official site, add the NuGet package to a new ASP.NET Core project, and follow the quick‑start guide. Within minutes you’ll have a functional viewer that can pull documents from Azure Blob, enable annotation, run OCR‑based search, and perform secure server‑side conversion. For step‑by‑step instructions, visit the Doconut documentation and start building your cloud‑native document experience today.
Ready to transform your document workflows? Sign up for the Doconut free trial now and see how easy it is to deliver secure, searchable, and collaborative document experiences in any .NET application.