Practical guide
How to Convert Markdown to PDF
Markdown is a plain-text way to add structure and emphasis to a document. It is quick to write, easy to revise, and stays readable as source text. A PDF is useful when you need a portable copy with page layout preserved for sharing or printing. Docmark helps you prepare that layout in your browser and sends the finished document to your browser’s print dialog.
Step 1
Open the Markdown editor
Open the Docmark editor to start with a document in your browser. You can write in the editor or use File → Open Markdown… to choose an existing .md or .markdown file. The exact file picker depends on your browser.
Step 2
Write your Markdown document
Use a small set of plain-text markers to organize the page. Docmark supports common Markdown and GitHub Flavored Markdown, including tables and fenced code blocks.
# Headingand## Sectioncreate headings.- Blank lines separate paragraphs. Use
**bold**for emphasis and*italic*for a lighter emphasis. [Project notes](https://example.com)creates a link.- Start lines with
-for a bulleted list or1.for a numbered list. - Use pipes and a separator row to write a table.
- Wrap source in triple backticks to create a code block; add a language such as
jsafter the opening fence when useful.
A practical example
Try a short project brief
This example uses headings, paragraphs, bold and italic text, a list, a GFM table, and a JavaScript code block. You can select and copy the source into the editor.
# Weekly Project Brief
## Goal
Prepare a clear update for the **project team** before the *Friday review*.
## This week
- Confirm the delivery date
- Review the draft with the team
- Share the final document
## Milestones
| Milestone | Status |
| --- | --- |
| Draft | Ready for review |
| Final PDF | Next step |
## Small code example
```js
const nextStep = "Review the draft";
console.log(nextStep);
```After pasting, review the live preview to see how the Markdown becomes a paginated document.
Step 3
Customize the document
Open Document settings to shape the printed pages. Choose A4 or Letter paper, portrait or landscape orientation, and adjust margins in millimeters. The preview updates as settings change, and Docmark paginates the content automatically for the selected layout.
- Appearance: choose a document theme (Default, Technical, Academic, or Minimal), font family, base font size, line height, and text alignment.
- Headers and footers: turn each on and set its text and alignment.
- Page numbers: show or hide them, choose their position, and set the starting number.
Review the preview after changing the page size, orientation, or typography. These settings change the space available to text and can change where pages break.
Step 4
Export the PDF
- Select Export PDF in the editor.
- Wait for your browser’s print dialog to open.
- Choose Save as PDF as the destination, if your browser offers it.
- Review the available paper size, margins, scale, and other print options.
- Save the PDF to your device.
Print dialog labels and options vary by browser and operating system. Check the preview in the dialog before saving; results can differ between browsers and their print settings.
Optional features
Use advanced Markdown features
Add a table of contents
Place this complete block on its own between sections. Docmark builds the contents from document headings through level three and adds page references in the preview.
:::toc
:::Render a Mermaid diagram
Use a fenced block labelled mermaid. Docmark renders supported Mermaid source locally in the browser.
```mermaid
flowchart LR
Draft --> Review
Review --> Export
```Start a new page
For a manual page break, put this complete directive on its own between the surrounding content:
:::pagebreak
:::Understand local documents and privacy
Docmark parses and prepares your Markdown in the browser. Workspace documents and settings are saved in IndexedDB in the current browser profile; they do not automatically sync between devices. Keep a separate copy of important work by saving the Markdown file to your device.
PDF export uses your browser’s print function. The document and PDF are not uploaded to a Docmark conversion server as part of that flow. If your Markdown includes images from remote URLs, your browser may request those images from their hosts. The public website also uses hosting, security, and Cloudflare Web Analytics services. Read the Privacy Policy for details.
Ready to make your document?
Open the editor and turn your Markdown into a print-ready preview.