PdfException - An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

Hi.

I am trying to implement the HtmlToPdfConverter using the WebKit engine.

I have been able to make it work just fine in my development machine, but when I deploy it to the server (Google Cloud Windows Server 2012R2), I get the error below:

PdfException  

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)Source : Syncfusion.HtmlConverter.Base
Stack Trace:
   at Syncfusion.HtmlConverter.WebKitConverter.CheckConversionDone(String tempFilePath)
   at Syncfusion.HtmlConverter.WebKitConverter.Convert(String url, Int32 width, Int32 height)   at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)


I have installed VC++ from the documentation link.

The files for OpensSSL are present in my Windows system folders, except for the libssl32.dll. So I downloaded the OpenSSL (also from the link provided in the documentation page) and run it. However, it complains the C++ 2008 is not installed, but it is, see image attached.

Programs1.jpg

Anyway, since libeay32.dll and ssleay32.dll are present in the folders, I run the application to see if it would work, but nope, I get the error above.

If I use the Blink engine, it works fine, but it is almost double slower and the final PDF image quality is not the same, so I would rather try to make the WebKit work in the server, since it works in my dev machine.

Would you guys have any advice on what I could try in my server?

Thanks in advance.

Ivan



12 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team August 19, 2021 11:47 AM UTC

Hi Ivan, 
 
Thank you for contacting Syncfusion support.  
 
The reported exception may occurs if the VC++ 2010 redistributable files are missing in the machine, where the conversion takes place. So, we need to install or copy the VC++ 2010 redistributable files to the server.  
 
If you do not have permission to install the VC++ 2010 or OPENSSL setup in the server machine, you can just copy the files from development machine to server with the mentioned location () to resolve the issue. Please refer below link for more information, 
 
for 64-bit machine, it should be place in $SystemDrive\Windows\SysWOW64 
for 32-bit machine, it should be place in $SystemDrive\Windows\System32 
 
We already working for optimising the performance of Blink rendering engine and currently we are working on it and the performance related changes will be included in our upcoming Volume 3 2021 release which is expected to be available in September 2021 tentatively.  
 
Regards, 
Gowthamraj K 



IB Ivan Borges August 19, 2021 12:02 PM UTC

Hi Gowthamraj.

Thanks for the reply.

Maybe I didn't understand well, but I attached a picture showing my server's installed Programs and we can clearly see the that the VC++ 2010 are installed. Maybe you missed that, but if not, please let me know what I could do.

I have permission to install anything on this server, I have an Admin account. There is no message stating I can't install OpenSSL, the message says VC++ 2008 is not installed, which you can check from the same picture that it is.

I also tried this on a third machine, a simple Windows 10 notebook, just to make sure, and the OpenSSL you guys provide won't install either.

Also, in the documentation ( https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit ) it says we need libssl32.dll in the Windows system folder. Unfortunately, your OpenSSL installation version don't have that. More, my machine where Syncfusion is installed doesn't have that and everything works.

So, in face of all this, would you have any other idea of what I could try?

Than



IB Ivan Borges August 19, 2021 12:16 PM UTC

Here are the files in their respective folders in my server. ( libssl32.dll isn't there since I don't have it, not even in my dev machine, where it works fine).

msvcp1.jpg


msvcp2.jpg



libeay1.jpg


libeay2.jpg


ssleay1.jpg


ssleay2.jpg



IB Ivan Borges August 20, 2021 10:46 AM UTC

Hi  Gowthamraj.


Any word about this?




GK Gowthamraj Kumar Syncfusion Team August 20, 2021 12:59 PM UTC

Hi Ivan, 
 
Thank you for your update.

 
Can we have web meeting to look into the issue directly on your server machine and provide the solution earlier. Please let us know your availability for web meeting, we will make every effort to have this scheduled on a time of your convenience. 
 
Note: We are working in IST hours.

Once you confirmed your availability, we can create a new incident and share the meeting invites.
 
 
Regards, 
Gowthamraj K 



IB Ivan Borges August 20, 2021 07:12 PM UTC

Hi Gowthamraj.


Thanks for the reply.


I will see what I can do. It is a production server and people around here get really nervous about tweaking with it. I would just really like it to throw your DLLs in the bin folder and that it worked... but, I will find a way for us to remotely connect, I hope.


On the other hand, we might as well decide for your next version including optimization of the Blink engine. Do you think you guys are going to achieve a good outcome?


Cheers.


Ivan

 



GK Gowthamraj Kumar Syncfusion Team August 23, 2021 11:10 AM UTC

Hi Ivan, 
 
Thank you for the update.  
 
We glad to know that you have resolved the VC++ configuration issue. Yes, we are working on to optimize the Blink performance and the changes are planned to included in our upcoming volume 3 2021 release, which is expected to be available in September 2021 tentatively.  
 
You can tract the status of the Blink performance improvement with following feedback link, 
 
Regards, 
Gowthamraj K 



IB Ivan Borges August 23, 2021 11:16 AM UTC

Hi Gowthamraj.


No, I didn't say I resolved the problem, it is still there.

What I said is that I would probably wait for the next release instead of messing with the server.


Thank you for the link with the status information.


Best.


Ivan




GK Gowthamraj Kumar Syncfusion Team August 24, 2021 11:40 AM UTC

Hi Ivan, 
 
Thank you for the update.  
 
We have attached the VC++ redistributable which is used in our HTML converter. If possible, kindly place this files in the server and try the conversion.  
 
For the performance issue, we will notify the status on the feedback link once the Volume 3 2021 release is rolled out.  
 
Regards, 
Gowthamraj K 


Marked as answer

IB Ivan Borges August 24, 2021 04:06 PM UTC

Hi Gowthamraj.


Brilliant!!!

Your VC++ DLLs worked.


Thank you!


Ivan




GK Gowthamraj Kumar Syncfusion Team August 25, 2021 06:38 AM UTC

Hi Ivan, 
 
Thank you for your update. We are glad to know that your problem has been solved. 

Please let us know if you need any further assistance with this. 

Regards, 
Gowthamraj K 



GK Gowthamraj Kumar Syncfusion Team September 30, 2021 02:43 PM UTC

Hi Ivan, 
 
We have included the fix for this issue “Need to optimize Blink HTML to PDF conversion performance” in our Volume 3 release v19.3.0.43.  
 
Please use the below feedback link to track the status of this issue.  
 
We are glad to announce that our Essential Studio 2021 Volume 3 release v19.3.0.43 is rolled out and is available for download under the following link. 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Gowthamraj K 


Loader.
Up arrow icon