0

I'm having issues with converting my Intranet Page to PDF file. I used 2 solutions which actually works, however with some issues.

Solution 1: I used wkhtmltopdf.exe tool. I was able to make it work on my local machine. However, when I deployed it to our Server, it stopped working until I notice that it's not working with intranet sites. When I tried extranet sites, it's working.

Solution 2: I took an alternative solution by getting the HTML of that site, and let the wkhtmltopdf.exe tool to make it PDF which also works, however, the data on my page that I'm trying to convert to PDF is database driven. So all information including images was not supplied when it was converted to PDF.

Please help if there's a way to make the wkhtmltopdf.exe tool work in Intranet Sites(solution 1) or how I can retrieve the whole page including data and images when converting it to PDF(solution 2)

Thank you very much!

carl
  • 103
  • 1
  • 12

3 Answers3

0

it stopped working until I notice that it's not working with intranet sites.

That is not an exhaustive problem report. I have done it by rendering a view to a string and then converting that string to a pdf using wkhtmltopdf.

Rendering the view to a string: Render a view as a string

i did not include wkhtmltopdf direct, rather I used the tuespechkin nuget package: https://github.com/tuespetre/TuesPechkin

Community
  • 1
  • 1
DasKrümelmonster
  • 5,816
  • 1
  • 24
  • 45
0

I would say to look at the permissions available. Intranet sites normally have different permission levels than a public facing site. It could be that the public facing sites have permissions that have been applied to the .exe such as the IIS_IUSR account to enable it to work with anonymous guest accounts, but lack the permissions needed in an intranet which often uses the domain user account of the logged in user to authenticate resources.

Mark Fitzpatrick
  • 1,624
  • 1
  • 11
  • 8
0

For whtmltopdf software to generate pdf on your intranet server, you need to have 2 files msvcp120.dll & msvrp120.dll in the same folder as wkhtmltopdf.exe file to running from server side. Hope this helps.

Hung Vu
  • 5,624
  • 2
  • 30
  • 27