Examples (5)
Render an HTML file to PDF
weasyprint path/to/input.html path/to/output.pdfRender an HTML file to PNG, including an additional user stylesheet
weasyprint path/to/input.html path/to/output.png --stylesheet path/to/stylesheet.cssOutput additional debugging information when rendering
weasyprint path/to/input.html path/to/output.pdf --verboseSpecify a custom resolution when outputting to PNG
weasyprint path/to/input.html path/to/output.png --resolution 300Specify a base URL for relative URLs in the input HTML file
weasyprint path/to/input.html path/to/output.png --base-url url_or_filenamemade by @shridhargupta | data from tldr-pages