Convert MDOC to PNG

Turn MDOC files into PNG files. Typeset in Libertinus Serif with examples in DejaVu Sans Mono on A4 pages unless page_size says letter as a document rather than a terminal manual, with the sections as headings, tag lists as definition lists, flags, arguments and command names as code and column lists as tables.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop MDOC files on the dialor turn it to pick what to do

Manual pages as PNG pictures.Each page of the manual becomes one PNG, drawn at 150 dpi.

  1. What you get

    The manual is typeset as a document, not as a terminal manual. Text is set in Libertinus Serif, and examples are set in DejaVu Sans Mono. Pages are A4 unless you set Page size to Letter.

    The sections become headings and tag lists become definition lists. Flags, arguments and command names are set as code, and column lists become tables.

  2. One file per page

    A manual that runs over several pages gives you one PNG for each page. Set Pages to a range such as 1-3,7 to convert only those pages. Every page is read when Pages is left out.

  3. Size and sharpness

    Resolution (dpi) sets how many pixels each inch of the page becomes. The default is 150, which reads well on screen. Set it to 300 for print. A higher value is sharper and makes a bigger file.

    Set Page size to Auto to let each page take the size of its own content. Set Width (px) to give the result an exact width. The height follows the aspect ratio unless you also give it, and then the picture can be stretched.

    To change the images afterward, try resize PNG or compress PNG.

MDOC and PNG.What each format is, and the options this conversion takes.

  1. 01 · dpi

    Resolution (dpi)

    How many pixels each inch of the page becomes when it is drawn as a picture. Higher is sharper and makes a bigger file. Around 150 reads well on screen, and 300 is the usual choice for print.

    36 to 600 default 150
  2. 02 · page_size

    Page size

    The size of the pages written. A4 is the standard in most of the world and Letter in North America.

    • a4 210 × 297 mm.
    • letter 8.5 × 11 in.
    • auto Each page takes the size of its own content.
    a4 · letter · auto default a4
  3. 03 · pages

    Pages

    Converts only some pages. Write single pages and ranges separated by commas, such as 1-3,7. Every page is read when it is left out.

  4. 04 · width

    Width (px)

    The exact width of the result in pixels. The height follows the aspect ratio unless it is also given, in which case the picture can be stretched.

    1 to 20000

The formats

From · MDOC

BSD mdoc Manual

Manual pages written in the semantic mdoc macros of BSD systems and macOS.

Extensions
.mdoc
MIME type
text/x-mdoc
Kind
Text and data
To · PNG

PNG

Lossless raster images with an alpha channel. Screenshots, icons and graphics with sharp edges.

Extensions
.png
MIME type
image/png
Kind
Images

In your code.The same MDOC to PNG conversion through the API, for your app or your agent.

terminal
$ cv convert report.mdoc report/ --to png
$ cv convert report.mdoc report/ --to png

Questions.What people ask about MDOC to PNG.

01OF 04

No. The manual is typeset as a document with headings, definition lists, code and tables, not as the plain text of a terminal.

Yes. Set Page size to Letter for 8.5 × 11 in. pages. A4 is the default.

Set Resolution (dpi) to 300, the usual choice for print. The file gets bigger as the value goes up.

You get one PNG for each page. Use Pages to pick only some of them.

More conversions.Other ways in and out of MDOC and PNG.