[Html2PdfConverter] HTML to PDF Error: No such file or directory . Cannot execute binary file.

Forge Component
(52)
Published on 2018-10-30 by Guilherme Pereira
52 votes
Published on 2018-10-30 by Guilherme Pereira

Good day Community!


I currently have a problem in generating PDFs for an enterprise environment running in JAVA.


This error keeps appearing (please see image below) when I click the google button or generate pdf with the google url. I followed the installation instructions and posts in the forum but still this error persist.


And this is the setup in the admin page.




Thanks!



Kind regards,

Louise

Hi Team,


I am also facing error while generating image and pdf in enterprises environment.I have tried to give different path in Binary Directories then also it taking TEMP folder path. I am using outsystems V10 .


Thanks,

Rajat Agrawal

Louise wrote:

Good day Community!


I currently have a problem in generating PDFs for an enterprise environment running in JAVA.


This error keeps appearing (please see image below) when I click the google button or generate pdf with the google url. I followed the installation instructions and posts in the forum but still this error persist.


And this is the setup in the admin page.




Thanks!



Kind regards,

Louise

Hi Louise,

 In additional binaries import .dll file(wkhtmltox.dll). Maybe thats the problem i think so


Hi Vitheya,


Thank you for responding. I added the dll file you suggested but it's the same results.


I read in a post that the file type should be "application/octet-stream" instead of "application/x-msdownload". But whenever I try to upload the dll, it automatically becomes msdownload.


May I ask what is the file type indicated in your admin? Thanks!



Kind regards,

Louise



Hey Louise and Rajat!

Have you tried a previous version of the extension, the files were NOT octet btw. 

Louise wrote:

Hi Vitheya,


Thank you for responding. I added the dll file you suggested but it's the same results.


I read in a post that the file type should be "application/octet-stream" instead of "application/x-msdownload". But whenever I try to upload the dll, it automatically becomes msdownload.


May I ask what is the file type indicated in your admin? Thanks!



Kind regards,

Louise



Hi,

myself imported these file(see below). Its worked.


Joao Fernando Bispo Serrano wrote:

Hey Louise and Rajat!

Have you tried a previous version of the extension, the files were NOT octet btw. 

Hi Joao,


I have tried with version 10 and I am getting the error. I also tried version 11 in my personal env and it is working fine.


Thanks,

Rajat Agrawal


Hi Louise,


If you’re using the JAVA version it means you’re using linux and as such there’s no point in uploading dlls or exes (those are for windows).


You need to get the linux version of wkhtmltopdf compatible with your server installed linux version and upload the respective binaries (for linux there’s only a main executable for pdfs and other for image generation and no dll or libraries should be necessary)


You can check the component instructions page for further details: http://<your environment>/HtmlToPdfConverter/InstallationIntructions.aspx but the admin page will look something like


(Note: the screenshot is not accurate to the latest version of the component and also your binaries directory may differ and you shoud check with your sysadmin of the proper way to set it)


Hope it helps.


Guilherme

Hi All,


Thank you so much for all the response! I will try them all now.


Kindest regards,

Louise

Hi Guilherme,


I would like to ask if should use the directory /home/wildfly or /opt/outsystems/user ? Currently I can both upload the necessary files (requirements in admin page) to these directories but whenever I try to convert an html to pdf/image, both directories display the same error. 


Please check attached image for error sample. 


I used the both wkhtmltox-0.13.0-alpha-7b36694_linux-trusty-amd64 and wkhtmltox_0.12.5-1.trusty_amd64 from the downloads page to check if there's a difference. But they still have the same error.


Though I can convert the pdf manually using the terminal but whenever I try to convert using the HTML to X Converter page, this error persist.


Thanks!



Kind regards,

Louise


Hi Louise,


I have no way of knowing that because it refers to your own installation. 


You should contact your sysadmin to identify that folder (or any other to which the binaries could be written). If you're using a cloud environment you need to reach out OutSystems Support for that info.


Let us know if you were able to overcome the issue


Thanks,

Guilherme