I'm developing a MVC web app in VB.Net and I have a pdf in base64 string format. It's possible to return that pdf to the view and see it, without creating a temp.pdf file?
Asked
Active
Viewed 188 times
0
-
"the view" - what is "the view"? What *type* of application are you writing? Is this a windows forms application? WPF? Windows Store? Some form of ASP.Net? – Damien_The_Unbeliever Jun 06 '14 at 06:54
-
I'm developing a MVC web app in VB.Net and i want to return a pdf. Something simiñar to this but without create: Return File(System.AppDomain.CurrentDomain.BaseDirectory & "\file.pdf", "application/pdf") – user1826240 Jun 06 '14 at 06:59
-
You can write to a response stream. – Allan S. Hansen Jun 06 '14 at 07:13
1 Answers
2
You say in a comment that you want something like:
Return File(System.AppDomain.CurrentDomain.BaseDirectory & "\file.pdf", "application/pdf")
So why not simply:
Return File(Convert.FromBase64String(base64string),"application/pdf")
References:

Damien_The_Unbeliever
- 234,701
- 27
- 340
- 448