1

I'm getting this error whenever I try to debug the Azure project from Visual Studio. I checked on my original site project file the Platform Target and project's and every dependence as well are using "Any CPU". Not really sure what to do from here.

Could not load file or assembly 'Pechkin' or one of its dependencies.

enter image description here

Nic
  • 12,220
  • 20
  • 77
  • 105
gdubs
  • 2,724
  • 9
  • 55
  • 102

2 Answers2

2

Are you running 32 bit allowed? Lots of docs out there talk about this being a limitation. mark as the answer please if that is the problem. There are solutions as well. apparently a guy did a fork called tuesPechkin with 64 bit versions.

macm
  • 544
  • 7
  • 21
  • 1
    in IIS > AppPool > your AppPool > Advanced > Enable 32 bit support – macm Apr 14 '14 at 19:01
  • Enabling 32-bit support or using TuesPechkin is correct. :) – tuespetre Apr 14 '14 at 20:39
  • so wait, do i just remove pechikin and use tuespechkin instead? – gdubs Apr 14 '14 at 21:01
  • He has quite a bit of support. If you follow his fork he updates and went through a huge azure issue for another guy. His implementation is different however so make sure you read his docs. – macm Apr 14 '14 at 21:03
0

It's not possible to get wkhtmltopdf working on Azure. See this thread and this Gitgub issue.

I am assuming you mean running wkhtmltopdf on Windows Azure Websites.

wkhtmltopdf uses Window's GDI APIs which currently don't work on Azure Websites.

A solution could be to create a Windows service (or for example a web api endpoint), which runs the Tuespechkin converter. Then create a VM in Azure and install the Windows service/end point there.

Nic
  • 12,220
  • 20
  • 77
  • 105
  • What would you suggest using instead? – Dean Martin Sep 07 '15 at 13:14
  • Hi, this is not a solution nor workaround. Its simply a suggestion for alternatives – Dean Martin Sep 08 '15 at 08:14
  • What are you expecting? The answer to this question is that using (Tues)pechkin in Azure does not work because of GDI limitations. For those running everything in Azure a solution is to use an Azure-hosted Windows machine which holds the PDF generation code. – Nic Sep 08 '15 at 08:22
  • Expecting a work around when you say you posted a link to it. That aside, what I need is some way of converting html to pdf on a website hosted in azure. So something that doesnt user GDI probably. Do you know of any solution to this? – Dean Martin Sep 08 '15 at 08:38
  • The "solution" answer's the OP's question (how to get pechkin working in Azure), not yours. You could create your own question, but it would be off-topic for StackOverflow. Anyway, iTextSharp might work for you, but that's not free. I don't know any others which are not based on wkhtmltopdf. – Nic Sep 08 '15 at 09:38