[Html2PdfConverter] Exit with code 1 due to network error: RemoteHostClosedError

I created a blank web screen with only one text message, and Roles 'Anonymous' checked. 

I had another web screen within same module with a button. Upon click the button, it will call the GeneratePDF method:


However, when click on the button, it always return error: Problem generating PDF from HTML

When debug further, the actual error show is: Error: Failed loading page https://.../TestPDF.aspx (sometimes it will work just to ignore this error with --load-error-handling ignore) Exit with code 1 due to network error: RemoteHostClosedError 

If I change the url to https://google.com, same error does not display. 


Another test done was:

1) Run the same HtmlConvertToPdf extension code in my local machine via a .net console.

2) Execute the console by:

a)  point the wkhtmltopdf.exe to use my local machice copy

b) point the url to the same url (https://.../TestPDF.aspx)

The pdf does generated successfully in my local machine's temp folder without issue. 



What could be the possible root cause?


Hi Jelyn,

I also encountered similar issue. In my case, I use GetRequestDomain to get the absolute url

"https://"+GetRequestDomain.Domain+"/eSpaceName/TestPDF.aspx

Hope that helps

ronny wrote:

Hi Jelyn,

I also encountered similar issue. In my case, I use GetRequestDomain to get the absolute url

"https://"+GetRequestDomain.Domain+"/eSpaceName/TestPDF.aspx

Hope that helps

 Hi Ronny, 


Thanks for your help. I tried the same but it did not resolve my issue.

 

Any luck solving this? We're having the same issue.

HI TIM,

 please use older version of htmltopdf extension. when we use new version of htmltopdf sometimes it's not compatible with our platform server version.  please try this approach.