# Printable Ruled Paper Maker

> Places every writing baseline in whole micrometres, shows where the first and last rules land, and creates a physically-sized SVG sheet with optional dashed, dotted and vertical guide lines.

Use it: https://tessalor.com/en/print/printable-ruled-paper

This tool runs entirely in the browser. Nothing entered into it is uploaded.

## Formula

```
firstLine = edgeMargin + headingSpace
bottom    = pageHeight - edgeMargin

if firstLine <= bottom:
  writingLines = floor((bottom - firstLine) / spacing) + 1
  lineY[n]      = firstLine + n x spacing
otherwise:
  writingLines = 0

ruledWidth     = pageWidth - 2 x edgeMargin
totalRuleLength = writingLines x ruledWidth

Every length is held as an integer number of micrometres, then written to
an SVG whose width and height are declared in millimetres.
```

## Assumptions

- Paper dimensions are trimmed physical sizes. The printer's hardware margin is not deducted; a requested line can still be clipped by a device that cannot reach it.
- The first rule is the edge margin plus the extra heading space. Heading space does not replace the blank edge margin.
- A line exactly on the bottom boundary is included, which is why a sheet can have one more rule than it has spacing intervals.
- The vertical guide is measured from the paper edge and clamped inside the horizontal writing width. Zero omits it entirely.
- Physical size is preserved only when the print dialogue uses 100% or Actual size. Fit-to-page deliberately rescales the sheet.

## Inputs

| Name | Label | Type | Default | Range |
| --- | --- | --- | --- | --- |
| `pageSize` | Paper | select | a4 |  |
| `orientation` | Orientation | select | portrait |  |
| `lineSpacing` | Distance between lines | number | 8 | 2 to 30 |
| `margin` | Blank edge margin | number | 12 | 0 to 50 |
| `topSpace` | Space before the first line | number | 20 | 0 to 100 |
| `lineWeight` | Rule weight | number | 0.2 | 0.05 to 2 |
| `lineStyle` | Rule style | select | solid |  |
| `leftGuide` | Vertical guide from left edge | number | 32 | 0 to 100 |

## Outputs

- `writingLines` — Writing lines (integer), primary
- `firstLineY` — First line from top edge (mm) (number)
- `lastLineY` — Last line from top edge (mm) (number)
- `ruledWidth` — Length of each rule (mm) (number)
- `totalRuleLength` — Horizontal rule length (m) (number)
- `guidePosition` — Vertical guide (number)

## Questions

### What does line spacing measure on ruled paper?

It is the baseline-to-baseline distance between adjacent horizontal rules. It is not the blank gap between their visible stroke edges, which becomes slightly smaller when a heavier rule weight is selected.

### Why does the page use micrometres internally?

The number of lines depends on rounding down a division. Converting each accepted millimetre value to a whole micrometre makes quarter-inch and decimal spacing exact at that boundary instead of nearly exact in binary.

### Can an SVG really have a paper size?

Yes. Its root declares width and height in millimetres as well as a matching view box. A print application that honours those physical units can place the vector geometry at the requested scale.

### Why is the red guide moved when I put it inside the edge margin?

A guide outside the horizontal rules would sit in the deliberately blank border and might be clipped by the printer. It is therefore clamped to the first or last writable x-coordinate.

## Sources

- [CSS Paged Media Module Level 3](https://www.w3.org/TR/css-page-3/) — W3C, applies to named A-series and North American page sizes. Retrieved 2026-08-01.
- [CSS Values and Units Module Level 3](https://www.w3.org/TR/css-values-3/) — W3C, applies to physical millimetre and inch units in SVG and print. Retrieved 2026-08-01.
- [SI Units — Length](https://www.nist.gov/pml/owm/si-units-length) — National Institute of Standards and Technology, applies to international inch of exactly 25.4 millimetres. Retrieved 2026-08-01.

## Variants

- [How many 8 mm writing lines fit on A4 paper?](https://tessalor.com/en/print/printable-ruled-paper/8mm-lined-paper-on-a4)
- [How do I make quarter-inch ruled US Letter paper?](https://tessalor.com/en/print/printable-ruled-paper/quarter-inch-lines-on-letter-paper)

---

Estimate, not advice. See https://tessalor.com/en/disclaimer.
Machine-readable catalogue: https://tessalor.com/api/tools.json
