Hello Alexander,
?
?It seems that the page you are trying to convert (https://www.example.com/html-generator.php) doesn't support HTTP basic authentication.
?
?Please try the following example. It works fine.
?
?<?php
require_once("pdfcrowd.php");
try {
$client = new \Pdfcrowd\HtmlToPdfClient('demo', 'ce544b6ea52a5621fb9d55f8b542d14d');
$client->setHttpAuth("guest", "guest"); // settings username and password name to get access to https://jigsaw.w3.org/HTTP/Basic/, see https://jigsaw.w3.org/HTTP/
$pdf = $client->convertUrl('https://jigsaw.w3.org/HTTP/Basic/');
// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: max-age=0");
header("Accept-Ranges: none");
header("Content-Disposition:inline;filename=\"test.pdf\"");
echo $pdf;
exit;
} catch (PdfcrowdException $err) {
var_dump($err->getCode());
var_dump($err->getMessage());
}