This is an archived forum post. The information may be outdated. Contact us if you have any questions.

[3] No URL set!

rahulmohan82 wrote on 2015-09-05:
Hi,
I am using trial version of the API. I am using following API.

$pdf = $client->convertHtml($html);

However I keep getting exception message: [3] No URL set!

Please help.

Thanks
Rahul
rahulmohan82 wrote on 2015-09-05:
I tried a very basic code example

$client = new Pdfcrowd("my user name", "my secret key");

// convert a web page and store the generated PDF into a $pdf variable
$pdf = $client->convertURI('http://www.google.com/');

// set HTTP response headers
header("Content-Type: application/pdf");
header("Cache-Control: max-age=0");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"google_com.pdf\"");

// send the generated PDF
echo $pdf;
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}

I keep getting same error: No URL Set. Also i just verified for every request i am loosing tokens. That means The request id definately received by your servers. This issue is driving me crazy. Please help.

Thanks
Rahul
support wrote on 2015-09-05:
Hello Rahul,

That's odd. Did you make any changes to pdfcrowd.php?