We are using rotativa to generate pdf which is working fine in our local system and in demo server but when we generate pdf in production server then it do not display images and style sheet format on production server. Here we are able to generate pdf on production server but only text information is displaying in generated pdf images and style sheet format in missing in the production server pdf. I have checked all of the path for images and style sheet are correct and these are available in the server. all of the necessary permission in given like IUser, Network services, IIS_user with full permission to rotativa folder. can any one have idea regarding what can be the issue and there resolution. Thanks to all of you in advance.
Asked
Active
Viewed 1,675 times
1
-
1Possible duplicate of [Chinese and Japanese character encoding issues when exporting HTML to PDF](http://stackoverflow.com/questions/18679202/chinese-and-japanese-character-encoding-issues-when-exporting-html-to-pdf) – Arman H Nov 13 '15 at 23:09
-
1How are these assets linked in the HTML? Relative or absolute URLs? If relative, are you sure Rotativa has access to these assets, and that they are linked correctly relative to where Rotativa is running from? – Arman H Nov 13 '15 at 23:25
1 Answers
2
I had the same issue I access my prod server by DNS "https://myserver.com" but inside the server this dns in not solved, so rotativa cant find the css and images
I edited my C:\Windows\System32\drivers\etc\hosts file and add this line
127.0.0.1 myserver.com
i hope it helps you

Adrian Molina
- 41
- 3