[Html2PdfConverter] Compatability with Platform 9.0.0.7?

[Html2PdfConverter] Compatability with Platform 9.0.0.7?

  
Forge Component
(40)
Published on 24 Mar by Guilherme Pereira
40 votes
Published on 24 Mar by Guilherme Pereira
Hi,

I've just upgraded my environment (.Net server) to Platform 9.0.0.7 and now the function seems to be broken. I've republished all modules after the platform upgrade and did no changes to the pdf functions. Now, whenever I try to generate a pdf, i get this error:

'The systems cannot find the file specified.'
 at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssExecutablePath, String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput)
   at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDF2(HeContext heContext, String inParamExecutablePath, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)


Please advise on the issue.
Thanks.


Cheers,
Magdelyn
Hi Magdelyn,

The error seems to be related with not being able to find the executable for the PDF generation. By going into the administration page and (re)upload the exe might do the trick but we'd appreciate your help first as there might be a bug that we're not aware of. So befor eyou upload the exe can you do the following:

1) Go into your server instalation folder and inside go to the folder Platform Server\running\HtmlToPdfConverter and check if inside you have the file wkhtmltopdf.exe

2) Go to service center to HtmlToPdfConverter espace module and run the timer InitBinaries. Did you get any errors on Error log? If so please can you share the log with us?

3) If the timer runs successfully can you check the folder again (from step 1) and see if the binary is there now?

Please let us now how it goes.

Cheers,
Guilherme
Hi,

I executed step 1-3 without any issue. The file was in the folder. No errors. The binary is still there.

In the end I reuploaded the exe file again and it worked perfectly fine. 
So I'm not too sure what is the issue.
And thanks for the help.


Cheers,
Magdelyn
Hi Magdelyn,

Glad it is working. By the way what kind of environment are we talking about? Is it a cloud or a on-premisses infrastructure?

Cheers,
Guilherme
Hi guys,

Glad to know someone else was also having this problem ;) I ran into the same issues after an upgrade to 9.0.0.11 but my symptoms were slightly different, however the same resolution as Magdelyn Chow worked:

   1. I first found 2 directories in my Platform Server\running directory,
      i) one immediately before the upgrade with all the usual directory structure files and folders but no .exe files in /running/binaries folder.
      ii) another one completely empty except for the /running/binaries folder which contained both .exe files
 
   2. I ran the timer successfully - no errors detected - but it also didn't solve my problem
 
   3. checking my folder after the timer executed I found the old directory mentioned in 1.i) was no longer present and the other one mentioned at 1.ii) was now showing all usual files and folders except /running/binaries contents (the 2 .exe binaries not present)

   4. after running the installation instructions (reuploading the .exe and .dll files) everything got working again.

While we don't get a fix available I'll be sure to include these reupload tasks in my installation plan, for reference.

Cheers,
Pedro
Hi Guilherme,

The current environment is on cloud for me.

Cheers,
Magdelyn
About my previous post, I've found the cause: it's related to farm environments (multiple frontend servers).