Document Viewer for ASP.NET Core and .NET Standard
8/12/2023

Document Viewer for ASP.NET Core and .NET Standard

Which runtimes the Doconut viewer targets, where it runs, what the browser has to install, and what the server does instead. Facts, not a sales page.

The viewer that runs this site is a native .NET component. In your own project it is a reference, not a service you call out to. Two build targets: .NET Framework 4.0 and above, and .NET Standard 2.0 and above, which is what puts it inside .NET Core and everything after it. The component is Doconut.

ASP.NET CORE | .NET STANDARD DOCUMENT VIEWER
ASP.NET CORE | .NET STANDARD DOCUMENT VIEWER

Which target you are on

Pick by what the project already is, not by which sounds newer.

  • WebForms or MVC on .NET Framework — the 4.0+ target. Nothing to change.
  • ASP.NET Core MVC or Razor Pages — the .NET Standard 2.0 target.
  • Blazor Server — the same .NET Standard 2.0 target. Rendering happens on the server either way, so the hosting model does not change what the component needs.
  • Linux containers — supported. It is the .NET Core path, in a container.

Both targets are the same renderer. The target decides which assembly you reference, not which formats you get.

What the browser installs

Nothing. No ActiveX, no plugin, no Java, no reader. The server turns the document into something a browser already knows how to draw, and sends that. This is why the viewer behaves the same on a locked-down corporate desktop as on a phone: there is nothing on the client to be missing or out of date.

What the server does instead

Everything. The document is opened, laid out and rendered on your machine, which has two consequences worth planning for.

  • Office is not needed on the server. The renderer is native .NET and reads the formats directly. No Office install, no Interop, no COM.
  • Rendering costs CPU and memory on your box. A 200-page PDF and a 40 MB CAD drawing are not the same request. Size the machine for the largest file you will actually accept, and cap uploads at that.

What it is not

It is not a client-side JavaScript library that opens files in the browser, and it is not a hosted API you send documents to. If you need either of those, this is the wrong component and it is better to know at the start.

Want to see the output before you reference anything? It is the same renderer behind this site's viewer — upload a file and that is what your users would get. Licensing, packages and API docs are at Doconut.com.