markdownviewnote.md

Markdown to PDF

Markdown to PDF, without an upload.

Markdown to PDF on this page happens in the browser. Open a .md file or paste the text, choose A4 or US Letter, choose a margin of 12, 16, or 24 mm, and press Save PDF. The print dialog opens. Set the destination to Save as PDF. The file is written on your computer. The note is not uploaded, and there is no account. The preview above is what prints: headings, lists, code, and tables. The toolbar and the source stay off the paper. The paragraphs under the tool are an explanation, not part of the PDF, and they disappear once the file is open. Pandoc can make a more formal PDF, and it usually asks you to install LaTeX. A typical online converter takes the file to a server. This page does neither.

A one-page meeting note

# Launch review

## Decisions

Ship the reader first.

| Item | Owner |
| --- | --- |
| Outline | Reader page |
| Paper size | PDF page |

On A4 with a 16 mm margin the note fits on one page. “Launch review” is the heading, the decision is one paragraph, and the table has two columns. The source and the buttons are not on the paper.

A README with a long command

## Install

```bash
npm install
npm run build
```

The build writes `dist/`.

“Install” is a heading. The two commands sit in a monospace block, and the line wraps inside the text width rather than running off the page. At 12 mm the text is 186 mm wide on A4, which keeps a longer command on fewer lines than 24 mm does.

A table that crosses a page

| Build | Result |
| --- | --- |
| 1 | Pass |
| 2 | Pass |
| 3 | Fail |

Add rows until the table is longer than one page.

The header row Build and Result is printed again at the top of the next page. The row is not copied in the markdown. A row is kept together. If a row is wider than the text width, lower the type size or use the 12 mm margin.

What is different

This pageA typical online tool
The file stays in this browserThe file is uploaded to a converter
A4 or Letter, and a margin in millimetresOne fixed page, often with a watermark
You choose Save as PDF in the print dialogA server sends a PDF back
A long table repeats its header rowThe header appears once, then the columns have no names
Page numbers come from the browser’s headerA logo or a trial line is printed for you
No account and no LaTeX installPandoc, plus a TeX install, before the first PDF

A4 and Letter, in millimetres

A4 is 210 mm wide and 297 mm tall. US Letter is 8.5 by 11 inches, which is 215.9 mm by 279.4 mm. Letter is 5.9 mm wider than A4 and 17.6 mm shorter. The choice is sent to the browser as the page size. Chrome and Edge usually follow it. If the dialog shows another size, set Paper size to the same choice, then save.

The difference shows on a two-page note. A4’s extra height is about four more lines at the default type size. Letter’s extra width is a few more characters on a long code line. A note that fills Letter may spill onto a third A4 page, and a note that fills A4 may feel short on Letter. Use A4 when the document will be printed outside the United States. Use Letter when the printer and the reader are in the US. Safari puts the PDF command in the PDF menu of the print dialog. Firefox lists Save to PDF as the destination.

How the margin is calculated

The menu offers 12, 16, or 24 mm. That number is the margin on every side. It is written into the page as a real page margin, not a frame drawn around the preview. The text width is the paper width minus the left margin minus the right margin.

A4 at 16 mm leaves 210 − 32 = 178 mm for the text. Letter at 16 mm leaves 215.9 − 32 = 183.9 mm. A4 at 12 mm leaves 186 mm. A4 at 24 mm leaves 162 mm. The same subtraction applies to the height. A4 at 16 mm leaves 297 − 32 = 265 mm. Letter at 16 mm leaves 279.4 − 32 = 247.4 mm, so Letter holds fewer lines even though it is wider. Use 12 mm for a code listing. Use 24 mm for a note someone will read on paper. The type size on screen is the type size that prints. The preview uses this same margin, so the line you see is the line that prints. Changing 24 mm to 12 mm does not change the type size. It only gives the line another 24 mm.

Why a long table repeats its header

A markdown table has one header row and then the body. When the table runs past the bottom of the page, the header is marked to print again at the top of the next page. The browser does that. The header is not a second copy of the row in the file, and you do not add it by hand.

Each body row tries to stay on one page. A totals line at the bottom is just another row, so it does not repeat. A column does not stay pinned while you scroll, the way it would in a spreadsheet. A table that fits on the page prints its header once. The repeat starts only when a row crosses onto the next page. If the table is wider than the text width from the margin sum above, the extra columns are cut off or shrunk. Lower the type size, or switch from 24 mm to 12 mm, and print again.

Page numbers and a running header

This page does not draw a page number into the note. The number, the date, and the address come from the browser. In Chrome or Edge, open More settings in the print dialog and turn Headers and footers on. The dialog then adds a line at the top and the page number at the bottom. Turn it off when you want neither. Safari and Firefox have the same switch under their own labels.

There is no field here for a custom running head, such as a chapter title on every page. That needs Pandoc or LaTeX. What you set here is the paper size and the margin that the browser’s header has to sit inside. The header sits in that margin, so 12 mm can feel tight once the line is on. If it crowds the first line of the note, use 16 mm. The page number is the browser’s count of sheets, not a number written in the markdown. This site does not add a logo or a trial line.

Other tools, same draft

Questions

Can I convert Markdown to PDF without installing anything?

Yes. Open the file on this page and use Save PDF. The browser writes the file. Pandoc is the route that asks for an install.

What is the easiest way to convert Markdown to PDF?

For one note, open it here, pick A4 or Letter, and choose Save as PDF in the print dialog. A repeated build with a table of contents is a job for Pandoc.

Why do I see a print dialog?

Saving as PDF is the browser’s own feature. Set the destination to Save as PDF. The file is written by your computer, not uploaded.

Why does Pandoc ask for LaTeX?

Pandoc’s usual PDF engine is LaTeX. This page does not use Pandoc. It prints the rendered note, so there is no LaTeX step.

Will the file be uploaded?

No. The preview and the PDF both happen in this tab.

Will Chinese characters turn into boxes?

Only if this computer has no font for them. The page asks for PingFang, Noto Sans SC, and Microsoft YaHei first.

Are there watermarks?

No logo and no trial banner is added. The browser can still add a date or a URL. Turn those off in the print dialog.

How do I add page numbers?

Turn on Headers and footers in the print dialog. Chrome and Edge put that switch under More settings. This page does not type a page number into the note.