58
Views
9
Comments
Solved
[HTML2PDF] problem generating with PDF from html, URLs: -,outputFileNanme: C:\Users\OutsystemsAp
Question
html2pdf
Service icon
Forge asset by Miguel Antunes

Hi All, 

I am getting below error when using this forge component when using in Dev instance. 

Problem generating PDF from HTML, URLs: -, outputFilename: C:\Users\OutsystemsApplications\AppData\Local\.local-HtmlToPdfConverter\case09923-08ea-4b98-b6f6-81f4e2e8122e6.pdf:PDF not generated.

It is working in my local instance. I have nothing to configure and just installed component and used the method "GeneratePDF. I am passing html to generate pdf instead of using URL option. 

Is there anything I need to configure in Dev instance. 

Appreciate if you can advise. Thank in advance.

Joe

UserImage.jpg
Joe Khaung
Solution

Hi All, I found out the issue. I need to add wkhtmltopdf.exe file location in "Environment_BinariesPath" at Site Properties. It is now resolved. Thanks all for your help.

UserImage.jpg
Jason Paul Alcantara

Hello Joe,

May I ask what do you mean by "wkhtmltopdf.exe file location"? Do you need to install it into your local storage/server?

Hope you can answer soon. Thank you!

2024-07-17 07-59-24
Pratya Homhual

It looks like you trying to save file that you've download name C:\Users\OutsystemsApplications\AppData\Local\.local-HtmlToPdfConverter\case09923-08ea-4b98-b6f6-81f4e2e8122e6.pdf  So filename might  invalid format.

UserImage.jpg
Joe Khaung

I am not trying to download the file. My app generates the PDF based on html that I have constructed and will send it as attachment in the email notification. What is blocking me now is that pdf cannot be generated at all. 

Any idea what I suppose to fix at dev server? Anything I need to configure? Thank. 

UserImage.jpg
Alexandre Yip

Hi Joe Khaung,

Check the in HTML content if you have embebded images included in the HTML

sample:  src="cid:image001.png@01D65EA3.2EB9D860"


You can do a test removing it from the HTML manually and use the bellow sample to paste the HTML and try to generate.

https://miguel-antunes.outsystemscloud.com/HTML2PDFDemoApp/Demo.aspx 


In my case the image was not important ( was a logo) and the solution was removing it from the HTML using a regex


Regards



UserImage.jpg
Joe Khaung

I do not have embedded image in html. It is plain text and date only. Sample code was working in my local host, not in Dev instance.

UserImage.jpg
Alexandre Yip

Hi Joe Khaung, 

Can you provide the HTML?

Once you are saying that you have working on your local host and not at DEV, do you have all code with dependencies updated? 

Versions of OutsystemsUI are the same?

Regards,


UserImage.jpg
Joe Khaung

Hi Alexandre,

My html is simplified version from https://miguel-antunes.outsystemscloud.com/HTML2PDFDemoApp/Demo.aspx, which I removed image. 

OutsystemsUI versions from both local and dev OS are the same.

Thank!


UserImage.jpg
Alexandre Yip

Hi Joe Khaung, 

Does the error occurs to all Htmls? or is just a particular Html? 

Regards 

UserImage.jpg
Joe Khaung
Solution

Hi All, I found out the issue. I need to add wkhtmltopdf.exe file location in "Environment_BinariesPath" at Site Properties. It is now resolved. Thanks all for your help.

UserImage.jpg
Jason Paul Alcantara

Hello Joe,

May I ask what do you mean by "wkhtmltopdf.exe file location"? Do you need to install it into your local storage/server?

Hope you can answer soon. Thank you!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.