How to load file from mvc C# controller into webviewer

28 views
Skip to first unread message

Hans-Gunnar Lagermark

unread,
Nov 23, 2016, 12:32:27 PM11/23/16
to PDFTron WebViewer
Hi,

Is it possible to load a pdf directly from a C# mvc controller into webviewer?
The controller reads pdf as byte data from database.

Thanks,
Hans-Gunnar

Matt Parizeau

unread,
Nov 24, 2016, 3:03:09 PM11/24/16
to PDFTron WebViewer
Hi Hans-Gunnar,

I'm not too familiar with C# MVC but if you set your server endpoint to be the initialDoc option in WebViewer and your endpoint returns all the PDF data when a request is made to it then I would expect that this would work. This post might be helpful: http://stackoverflow.com/questions/1510451/how-to-return-pdf-to-browser-in-mvc

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages