[Html2PdfConverter] Html2PdfConverter - HostNotFoundError
Forge component by Miguel 'Kelter' Antunes
Published on 02 Jun 2020

Boa tarde,

Estamos a receber um erro na utilização deste componente (Html2PdfConverter)

2020-09-14 19:23:01 SimulatorsSelfService (Mortgage SelfService)

Could not find file 'C:\TEMP\TEMPETNCLBKOTX00000000000000000000000000000000.pdf'.

Exit with code 1 due to network error: HostNotFoundError

at OutSystems.NssHtmlConvertToPdf.CssHtmlConvertToPdf.MssGeneratePDF(String ssExecutablePath, String ssURL, String ssProxy, String ssOtherArgs, Byte[]& ssPDFBinary, String& ssMessageOutput)

at ssHtmlToPdfConverter.RssExtensionHtmlConvertToPdf.MssGeneratePDFExtension(HeContext heContext, String inParamExecutablePath, String inParamURL, String inParamProxy, String inParamOtherArgs, Byte[]& outParamPDFBinary, String& outParamMessageOutput)

Analisando a aplicação (Html2PdfConverter) o que conseguimos apurar é que ficheiro wkhtmltopdf.exe está a usar o domain externo e não o interno. 

Conseguem ajudar? 

Rank: #1821

Hi Joao,

Are you passing the right Page URL. The domain that your page is hosted is accessible from the outsystems server??

Best Regards

Devendra Baghel 

Rank: #4804


Im gonna step in for João :) ... the issue we are having is could be related to the fact that our app is consumed on an Iframe. In production we are having this issue, but in quality environment it doesn't happen.

the URL we are passing in the HtmlToPdfConverter.GeneratePDF is MakeAbsoluteURL(ReplaceURLDomain(URL))

the URL comes from a SEO\GetSEOEntryURL that points to the entry of the screen that builds the PDF.

Thanks for the speedy reply!