# PDF to PNG for Sharp Text and Line Art

> Turn PDF pages into PNG files with no compression blur, so small print, lines and charts stay crisp for slides, documentation or screenshots of a report page.

Use it online (free, runs in your browser): https://directory.milunir.com/pdf-tools/pdf-converters/pdf-to-image-converter/pdf-to-png/

PNG stores every pixel exactly, so black text on white keeps clean edges that JPG smudges. It suits a single page dropped into slides or a wiki, though files are larger.

## Worked example

- Save as: PNG
- Resolution: Sharp 150 dpi
- Pages: First page only
- JPG quality: 90

Result: Images: 1 image, PNG Page 1 size: 1275 × 1650 px Total size: 54 KB

## How it works

`pixel width = round(page width in points × dpi ÷ 72), pixel height = round(page height in points × dpi ÷ 72)`

- `points`: the page size stored in the PDF, 72 points to the inch
- `dpi`: the resolution picked: 72, 150 or 300 dots per inch

PDF.js reads the page's drawing instructions (text, vector shapes and embedded images) and paints them onto a white canvas scaled by dpi ÷ 72. The canvas is then saved by the browser as a JPG at the chosen quality or as a lossless PNG. Fonts that the PDF does not embed are drawn with similar fonts installed on your device, so letter shapes can differ slightly from the original.

Sources:

- [ISO 32000-2:2020 Document management — Portable document format — Part 2: PDF 2.0](https://www.iso.org/standard/75839.html), ISO
- [HTML Standard: the canvas element, toBlob()](https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-toblob), WHATWG
