// Import the HTML class from the WeasyPrint library
from weasyprint import HTML

// Instantiate HTML class and call write_pdf() method to convert Website URL to PDF
HTML('https://www.groupdocs.com/').write_pdf('groupdocs-weasyprint.pdf')