TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajesh Kumar
NA
222
38.6k
convert base64 to pdf and display in mvc
Dec 6 2020 9:37 PM
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"
)
Reply
Answers (
4
)
Show profile picture when user is logged in and editing user informa
Code for barcode with asp.net core c# mvc