Convert RST to PNG
Turn RST files into PNG files. Typeset in Libertinus Serif with code in DejaVu Sans Mono on A4 pages unless page_size says letter, with the title block, headings, lists, tables, code, admonitions, footnotes and math.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop RST files on the dialor turn it to pick what to do
Your reStructuredText as PNG pages.Each page of the document is drawn as one PNG, at 150 dpi unless you change it.
What you get
The document is typeset in Libertinus Serif, with code in DejaVu Sans Mono. Pages are A4 unless Page size says letter. The title block, headings, lists, tables, code, admonitions, footnotes and math are all drawn.
Each page becomes one PNG, so a longer document gives you several files. PNG is lossless and keeps an alpha channel.
What changes or is left out
Directives that only Sphinx knows keep just their text. Comments are dropped. Images become their description, so the picture itself does not appear.
Size and pages
Set Resolution (dpi) to a value from 36 to 600. A higher value is sharper and makes a bigger file. Around 150 reads well on screen, and 300 is the usual choice for print.
Set Page size to a4, letter or auto. With auto, each page takes the size of its own content.
Set Pages to convert only some pages, such as 1-3,7. Every page is read when it is left out. Set Width (px) for an exact width from 1 to 20000 pixels. The height follows the aspect ratio unless you also give it, and then the picture can be stretched.
To change a PNG afterward, try resize PNG or compress PNG.
RST and PNG.What each format is, and the options this conversion takes.
- 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 - 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.
a4210 × 297 mm.letter8.5 × 11 in.autoEach page takes the size of its own content.
- 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.
- 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
reStructuredText
reStructuredText, the markup of Python documentation and Sphinx.
- Extensions
- .rst
- MIME type
- text
/x -rst - Kind
- Text and data
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 RST to PNG conversion through the API, for your app or your agent.
$ cv convert report.rst report/ --to png$ cv convert report.rst report/ --to pngQuestions.What people ask about RST to PNG.
Not always. Each page becomes one PNG, so a document that runs over several pages gives several files.
Yes. Set Pages to single pages and ranges separated by commas, such as 1-3,7.
Directives that only Sphinx knows keep just their text. Comments are dropped.
Images become their description. The picture is not drawn.