I have a page and I just want it to save it as pdf.
Like if you click print on the webpage and save as pdf or microsoft print to pdf.
Here is my code
`<?php
// Include the main TCPDF library (search for installation path).
require_once('./TCPDF-main/tcpdf.php');
// create new PDF document
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->setTitle('Title');
$pdf->AddPage();
//To print
$html = 'https://examplewebsite.com';
//Write to pdf
$pdf->writeHTML($html);
$pdf->Output('Newp file.pdf');
?>`
Currently it is creating a pdf which has https://examplewebsite.com
but not the contents. How to print the contents?