Convert RST to PDF Online for Free
Render reStructuredText into fixed pages while checking the parser, directives, LaTeX step, tables, and the exact source tree included in the build.
- Add a file Choose or drop it here
- Pick the format Change it whenever needed
- Download the result After conversion completes
RST is readable source markup that first becomes a document tree
reStructuredText, usually shortened to reST or RST, is the plaintext markup syntax and parser system in Docutils. Docutils describes it as readable, what-you-see-is-what-you-get source text designed for Python docstrings, simple web pages, standalone documents, and extensible documentation domains. A heading underline, list marker, explicit directive, role, hyperlink target, or indentation level is not decorative punctuation: the parser turns those source constructs into structured document elements before an output writer decides how to represent them.
That structure is why an RST-to-PDF conversion is more than changing a text extension. A raw .rst file contains source conventions for sections, paragraphs, literal blocks, tables, footnotes, references, substitutions, and directives. PDF contains fixed rendered pages. Between them, a parser builds a document tree and a writer converts it to a target-oriented format. Docutils’ design documentation says writers translate the internal document tree into final formats such as HTML, XML, TeX, and others; by the time a writer receives the tree, the document should already be in final structural form.
Keep the RST source after publishing PDF. It is the editable evidence of the headings, links, source code, and directives. A PDF is a delivery copy, not a maintainable reST source. If a title, code block, table, or reference must change, correct the source, rebuild the PDF, and check the build messages. Editing a PDF page cannot repair a malformed directive or an omitted source file that will recur on the next build.
PDF normally arrives through a TeX rendering stage
Docutils does not describe PDF as a simple built-in text dump. Its front-end documentation explains that rst2latex reads standalone reStructuredText and creates LaTeX output; that .tex file is then processed with LaTeX or PDFLaTeX to make DVI, PostScript, or PDF. The related rst2xetex tool produces LaTeX for Unicode-aware XeTeX or LuaTeX, which then creates PDF. The page layout therefore depends on both the RST parser and the TeX engine, installed fonts, document settings, and target-specific transformations.
Sphinx uses the same broad idea for documentation projects. Its quick-start documentation says a directory of RST or Markdown sources can generate HTML, a PDF via LaTeX, man pages, and more. Sphinx’s builder reference adds that the LaTeX builder creates output first and the actual PDF build happens in the output directory as a second step. A build can therefore succeed far enough to write LaTeX files yet still fail when the TeX engine cannot resolve a font, package, image, or Unicode configuration.
This two-stage relationship explains why a PDF may differ from HTML rendered from the same RST. HTML uses browser and CSS layout; PDF follows the LaTeX route and fixed paper dimensions. A wide grid table, a long unbreakable inline literal, an oversized figure, or a language-specific font setup can fit in one output and overflow or fail in the other. Choose a PDF build path deliberately and inspect the produced pages, not just the first successful command message.
Fixed pages are valuable, but source semantics do not all become page features
- PDF gives a stable reading and print copy: the reader need not install Docutils, Sphinx, or a project’s extensions to view the rendered pages.
- RST remains the editable authority: section underlines, directives, substitutions, references, and source links are maintained in the markup, not by editing PDF text.
- TeX matters to output quality: Docutils routes RST through LaTeX or XeTeX/LuaTeX before PDF, so fonts and TeX packages affect the final document.
- Unknown directives are not silently equivalent: Docutils specifies a level-3 error and literal-block treatment when the directive handler is not installed.
- Large tables need target-specific review: Sphinx says HTML tables work well but LaTeX rendering is complex and points authors to
latex_table_style. - A multi-file project must be connected: Sphinx warns when a source document is not in a
toctree, because it is unreachable through normal navigation.
Use PDF when a fixed reference, print copy, or formal delivery is needed. Keep the RST source and the build configuration when future maintenance matters. For documentation that will be revised frequently, a PDF should be considered a versioned output: record the source revision and regenerate it after source or dependency changes rather than assuming it remains current.
Docutils and Sphinx add different parser and project rules
Docutils supplies the basic reStructuredText syntax. Sphinx uses reST as its default plaintext markup language but extends it with additional roles, directives, domains, cross-references, builders, and project configuration. An RST file that renders in a Sphinx project may use a Sphinx-only directive that bare Docutils does not recognize. Conversely, a source fragment can be valid basic reST yet be absent from a Sphinx PDF because the project’s root document and toctree do not include it. Identify the toolchain that owns the file before treating a generic RST conversion as authoritative.
Sphinx documents toctree as its central mechanism for connecting separate source files and making tables of contents. All project documents should occur in some toctree, or Sphinx emits a warning that a file is not reachable through standard navigation. The root document selected by root_doc is the top of that hierarchy. An RST-to-PDF request based on one leaf file may therefore omit context, cross-referenced chapters, and navigation intended by the project; a project build should start at its configured root, not at an arbitrary file.
PDF source conditions are also build-specific. Sphinx has builder tags such as latex and format tags that can control content through the only directive. A section may intentionally appear in HTML but be excluded from LaTeX/PDF. This is not an export failure until the build configuration is understood. Inspect the source conditions and chosen builder rather than trying to reinsert a missing section manually into the PDF.
Parser messages and page defects point to specific source fixes
An unknown directive appears as literal text or triggers an error. Docutils says an unrecognized directive handler generates a level-3 system message and includes the directive block as a literal block. This commonly means the project relied on a Sphinx extension or custom directive that is not installed in the current build. Use the same project environment, install or configure the declared extension, or replace the directive with a supported equivalent. Suppressing warnings does not turn an unknown directive into the intended document structure.
A directive has the wrong content, or a code block starts with unwanted spaces. In RST, indentation is syntax. Sphinx documents that directive options and content are indented relative to the directive, and that the indent is not a fixed number of spaces; an option line can establish a different content baseline. Check the blank line between options and content, then align the source as required by that directive. Do not strip all indentation from code blocks, because literal content needs its own preserved structure.
A section is absent from the PDF. Check the build root and every toctree before editing the output. Sphinx warns for documents outside normal navigation, and an only directive can deliberately select content by builder tag. Add the source file to the intended toctree or correct the conditional expression if it belongs in the PDF build. A manually merged PDF page will not solve the underlying project graph.
Tables, code, or non-Latin characters overflow or fail during TeX processing. Narrow the issue to a minimal source block, inspect the generated LaTeX log, and test the target engine. Docutils offers XeTeX/LuaTeX-oriented output for Unicode-aware engines; Sphinx notes that LaTeX table rendering is complex. Break long tokens, simplify a wide table, use the project’s table style, or configure a font and Unicode-capable engine in the source build rather than accepting clipped fixed pages.
RST-to-PDF facts that change the build decision
| Build fact | RST or project source | PDF implication |
|---|---|---|
| Core parser | Docutils parses reStructuredText into structure | Writer renders structure, not raw punctuation |
| Docutils PDF route | rst2latex or rst2xetex writes TeX | LaTeX, PDFLaTeX, XeTeX, or LuaTeX makes PDF |
| Sphinx PDF route | LaTeX builder writes an output directory | Actual PDF build is a separate step |
| Unknown directive | Missing handler creates level-3 system message | Directive block can appear as literal text |
| Multi-file hierarchy | toctree links source documents | Unreferenced file gets a reachability warning |
| Wide table | RST table syntax can be valid source | LaTeX rendering still needs target review |
Questions before treating an RST PDF as final documentation
Why does RST need LaTeX before it becomes PDF?
Docutils’ documented PDF route creates LaTeX from RST and then runs a TeX engine. Sphinx likewise creates PDF through its LaTeX build path rather than treating PDF as raw-text output.
Why did an RST directive print literally in the PDF?
A missing directive handler creates a Docutils level-3 error and the directive block is included as a literal block. Build with the correct extension or replace the unsupported directive.
Why is a chapter missing although its RST file exists?
Sphinx uses toctree relationships to assemble multi-file documentation and warns about files not reachable from that navigation. Check the root document, toctree entries, and any builder-specific only condition.
Can I correct a layout error only in PDF?
Correct the RST or build configuration, then regenerate. A PDF patch does not fix the directive, table, font, or source-tree condition that will affect future builds.