Why Join
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forumguidelines
Mandar Shinde
1.6k
408
52.3k
Regarding converting base64 string to pdf in Angular 8.
Oct 22 2019 3:22 AM
Dear all,
I hope you are doing well. I was developing one component using Angular 8 and ASP .Net MVC with REST Api.
I have generated one pdf using ASP .Net and I am returning array as base64 string to that component.
I have used following code to convert that base64 string to pdf is :
let html =
''
;
html +=
"<html>"
;
html +=
'<body style="margin:0!important">'
;
html +=
'<embed width="100%" height="100%" src="data:application/pdf;base64,'
+ result +
'" type="application/pdf" />'
;
html +=
"</body>"
;
html +=
"</html>"
;
setTimeout(() => {
const
win = window.open(
''
,
"_blank"
);
win.document.write(html);
}, 100);
above code works on desktop but could not able to run same code for tablet or mobile devices.
Please let me know solution on this problem.
Thanking you in advance.
Regards.
Reply
Answers (
2
)
2 condition inside foreach?
How to Encrypted Password and Decrypt password In Database