HTML2PDF - issues when using URL

Using the code below, converter.insertFromHtmlString works, however if I use insertFromURL(url), converter.convert returns false. I’m passing in a httpRequest.getRequestUrl, so the URL string should be valid. I also streamed the html to a file, and used a file URL, and the convert method still returns false. Are there options I need to set? Is there a way to debug? I tried converter.getLog but it returned blank. Thanks.

HTML2PDF converter = new HTML2PDF();
converter.insertFromHtmlString(htmlString);
PDFDoc doc = new PDFDoc();
if (converter.convert(doc)){
Convert.toXod(doc, outputFilePath);
}

Strange that converter.getLog() returns nothing. There is also converter.getHTTPErrorCode, but if the log is empty, then I suspect this will return zero.

I wonder if there is a problem with how the string from getRequestUrl is passed into insertFromURL. Can you try hard coding the url into the code, and see if that works.

As for local files, try passing the url as a typical path, and without the file:// protocol. For example “C:/users/user/desktop/mypdf.html”