Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

Hi I am new to angular and javascript, I got stuck in a situation i am getting a json response from api in which one key is returning a html response

"data": {
"abc" :null,
"htmlresponse": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<title>sadasad</title>\r\n\r\n </head>\r\n\r\n</html>"
}

I want to show this reponse as pdf in a page. Could any help in this? Should i use blob and put content with content type as pdf in it and display it on the page.

share|improve this question
1  
You could use jspdf as well, as its used here – Blauharley 21 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.