Can I use ASP.NET MVC 4 Web API to serve my XOD files?

208 views
Skip to first unread message

Kevin Kuo

unread,
Apr 21, 2014, 9:02:18 PM4/21/14
to pdfnet-w...@googlegroups.com
Q: Can I use ASP.NET MVC 4 Web API to serve XOD files to WebViewer?

A:
In general, we recommend pre-converting documents and serving XOD files as static resources for the best performance.
(WebViewer uses HTTP range requests to efficiently download only parts of the XOD file it needs.)

However, in the case where pre-converting is not possible... Yes, you can serve XOD file directly with ASP.NET MVC 4 Web API.

You can download a sample project showing how to do this here:

This sample shows how to serve a xod file from a controller  (ApiController class).
(It will load from a file, but you can adapt this to return any file stream. So you can use PDFNet SDK to convert and return the data.)

This sample also shows how WebViewer is set up to consume the data from the controller.
Reply all
Reply to author
Forward
0 new messages