0

I want to generate pdf in a3 page by inputting Html containing CSS and some jquery generated range bars using asp.net MVC i tried itextsharp but there is img tag error and no solution work regarding it. i tried jspdf but it not includes css.

Following solution i tried for below error:

<img src="assd.jpg"/> 

enter image description here

Affan Sheikh
  • 113
  • 11

1 Answers1

0

You can use rotativa to generate pdf documents from views, I’ve used it in the past with great results - look here for a walkthrough

https://www.c-sharpcorner.com/article/asp-net-mvc5-rotativa-easy-way-to-create-pdf-and-image-files/

Damian70
  • 348
  • 1
  • 3
  • 18
  • Is that a specific css class or all css not working? I’ve not had a problem when using it in the past. There is another question related to this https://stackoverflow.com/questions/37025246/rotativa-mvc-not-loading-css-or-images-on-pdf – Damian70 Apr 30 '20 at 19:27
  • all CSS not working it generates the pdf with the only logo in my HTML in the center of pdf. – Affan Sheikh Apr 30 '20 at 19:31
  • Can you post the html your trying you use, – Damian70 Apr 30 '20 at 19:33
  • The error dump isn’t happy with the IMG element, have you check this is correct? – Damian70 Apr 30 '20 at 20:29
  • yes i know i also try some fixes like closing image tag like this : and also but no effect. – Affan Sheikh Apr 30 '20 at 20:31