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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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