I have base64 data which i am getting from SOAP. I need to convert that base64 code to pdf and display in popupwindow.
if i convert base64 normally it will be in multipage tiff. sometimes it will be jpg, png. So i can't predict format. I have used following code which will convert from base64 to original format. but notsure how to display it in pop up box. whenever i clicked the button which will call below function, file will get downlaod into local machine. i don't want to download, need to display.
Any suggestion will be appreciated.
- In C#
- var byteA =
- @"base64string ";
- var imageBytes = Convert.FromBase64String(byteA);
- return File(imageBytes, "application /pdf");
- In MVC
- @Html.ActionLink("View Image", "PdfPartial")

Jignesh KumarRank #91 · 22.9K reputationPosted Dec 6, 2020, 5:44 PM EST
Mageshwaran RRank #411 · 6.1K reputationPosted Dec 6, 2020, 5:06 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 6, 2020, 6:20 PM EST
Sachin SinghRank #66 · 26.2K reputationPosted Dec 6, 2020, 6:58 PM EST