1RST2PDF(1) text processing RST2PDF(1)
2
3
4
6 rst2pdf - Convert reStructuredText documents to PDF
7
9 rst2pdf [options] [input] [-o output]
10
12 The usual way of creating PDF from reStructuredText (ReST) is by going
13 through LaTeX. The rst2pdf utility provides an alternative by produc‐
14 ing PDF directly using the ReportLab library.
15
17 -h, --help
18 Show this help message and exit
19
20 --config=FILE
21 Config file to use. Default=~/.rst2pdf/config
22
23 -o FILE, --output=FILE
24 Write the PDF to FILE
25
26 -s STYLESHEETS, --stylesheets=STYLESHEETS
27 A comma-separated list of custom stylesheets. Default=""
28
29 --stylesheet-path=FOLDERLIST
30 A colon-separated list of folders to search for stylesheets.
31 Default=""
32
33 -c, --compressed
34 Create a compressed PDF. Default=False
35
36 --print-stylesheet
37 Print the default stylesheet and exit
38
39 --font-folder=FOLDER
40 Search this folder for fonts. (Deprecated)
41
42 --font-path=FOLDERLIST
43 A colon-separated list of folders to search for fonts.
44 Default=""
45
46 --baseurl=URL
47 The base URL for relative URLs.
48
49 -l LANG, --language=LANG
50 Language to be used for hyphenation and docutils localization.
51 Default=None
52
53 --header=HEADER
54 Page header if not specified in the document.
55
56 --footer=FOOTER
57 Page footer if not specified in the document.
58
59 --smart-quotes=VALUE
60 Try to convert ASCII quotes, ellipsis and dashes to the typo‐
61 graphically correct equivalent. Default=0
62
63 The possible values are:
64
65 0. Suppress all transformations. (Do nothing.)
66
67 1. Performs default SmartyPants transformations: quotes (including
68 backticks-style), em-dashes, and ellipses. "--" (dash dash) is used
69 to signify an em-dash; there is no support for en-dashes.
70
71 2. Same as --smart-quotes=1, except that it uses the old-school type‐
72 writer shorthand for dashes: "--" (dash dash) for en-dashes, "---"
73 (dash dash dash) for em-dashes.
74
75 3. Same as --smart-quotes=2, but inverts the shorthand for dashes:
76 "--" (dash dash) for em-dashes, and "---" (dash dash dash) for
77 en-dashes.
78
79 --fit-literal-mode=MODE
80 What to do when a literal is too wide. One of error,over‐
81 flow,shrink,truncate. Default="shrink"
82
83 --fit-background-mode=MODE
84 How to fit the background image to the page. One of scale or
85 center. Default="center"
86
87 --inline-links
88 Shows target between parenthesis instead of active link
89
90 --repeat-table-rows
91 Repeats header row for each splitted table
92
93 -q, --quiet
94 Print less information.
95
96 -v, --verbose
97 Print debug information.
98
99 --very-verbose
100 Print even more debug information.
101
102 --version
103 Print version number and exit.
104
105 --no-footnote-backlinks
106 Disable footnote backlinks. Default: False
107
108 --inline-footnotes
109 Show footnotes inline. Default: True
110
111 --default-dpi=NUMBER
112 DPI for objects sized in pixels. Default=300
113
114 --show-frame-boundary
115 Show frame borders (only useful for debugging). Default=False
116
117 --disable-splittables
118 Don't use splittable flowables in some elements. Only try this
119 if you can't process a document any other way.
120
121 -b LEVEL, --break-level=LEVEL
122 Maximum section level that starts in a new page. Default: 0
123
124 --first-page-even
125 Whether first page is odd (as in the screen on "facing pages"),
126 or even (as in a book)
127
128 --blank-first-page
129 Add a blank page at the beginning of the document.
130
131 --break-side=VALUE
132 How section breaks work. Can be "even", and sections start in an
133 even page,"odd", and sections start in odd pages, or "any" and
134 sections start in the next page,be it even or odd. See also the
135 -b option.
136
137 --date-invariant
138 Don't store the current date in the PDF. Useful mainly for the
139 test suite, where we don't want the PDFs to change.
140
141 -e EXTENSIONS
142 Alias for --extension-module
143
144 --extension-module=EXTENSIONS
145 Add a helper extension module to this invocation of rst2pdf
146 (module must end in .py and be on the python path)
147
148 --custom-cover=FILE
149 Template file used for the cover page. Default: cover.tmpl
150
151 --use-floating-images
152 Makes images with :aling: attribute work more like in rst2html.
153 Default: False
154
155 --use-numbered-links
156 When using numbered sections, adds the numbers to all links
157 referring to the section headers. Default: False
158
160 $ rst2pdf rest.txt -o out.pdf
161
162 Produce an out.pdf file which is a PDF version of the ReST document
163 rest.txt.
164
166 Chris Lamb <chris@chris-lamb.co.uk> for the Debian project
167
168
169
170
171 RST2PDF(1)