0

I have tried two HTML to Image conversion packages HiQPd and NReco.

Both libraries work beautifully when run from Visual Studio on my local PC.

When I deploy to an Azure-hosted website, both packages fail thusly:

  1. HiQPdf throws Exceptions when invoking ConvertHtmlToImage(...).
  2. NReco produces a black rectangle for each rendered character.

The HTML I'm converting is simple stuff, like <p>Hello</p>

Is this a problem with Azure, hosting on servers in general, or not including some library which "everybody knows that!"?

Sylhare
  • 5,907
  • 8
  • 64
  • 80
Tim Mackey
  • 21
  • 3
  • There are several questions+answers posted here referring to the fact that Web Apps run in a sandbox and you cannot install anything like an ActiveX control or something else which requires registry modification etc. This is very likely what you're running into. – David Makogon Jul 05 '17 at 02:05
  • 1
    What Azure Apps subscription do you use? Free and Shared plans have very restrictive GDI API and wkhtmltoimage (used by NReco wrapper) will not work correctly. With Basic and above (VM-based plans) it should work correctly. – Vitaliy Fedorchenko Jul 05 '17 at 05:41

1 Answers1

1

Upgrading my Azure service plan to B1 Basic solved my problem. Thank you Vitaliy!

Tim Mackey
  • 21
  • 3