Markdown & HTML to PDF · Tutorial
How to save an HTML receipt or report as a PDF
3 min readbeginnerUpdated
You have an order confirmation as HTML and need a PDF for your records. This tutorial previews it with its own styles and saves it as a PDF.
What you need
- The Markdown & HTML to PDF
- The HTML file or code
Steps
Add the HTML
Paste the HTML or drop the .html file. The sample is an order confirmation with a table.
Keep the styles
Leave Keep the page's own styles ticked so it looks as designed.
Choose page setup
Pick A4 portrait with normal margins.
Save as PDF
Press Save as PDF and choose "Save as PDF" as the printer.
Try it yourself
Opens the Markdown & HTML to PDF with this tutorial's sample loaded.
Common mistakes
- Missing images
- Images from other websites are blocked in the preview. Embed them in the HTML.
- Background colours missing
- Tick "Background graphics" in the print dialog if your browser offers it.
Next steps
Go back to the Markdown & HTML to PDF, or keep going with one of these: