1PDFROFF(1) General Commands Manual PDFROFF(1)
2
3
4
6 pdfroff - create PDF documents using groff
7
9 pdfroff [-abcegilpstzCEGNRSUVXZ] [-d cs] [-f fam] [-F dir] [-I dir]
10 [-L arg] [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn]
11 [-T dev] [-w name] [-W name] [--emit-ps] [--no-toc-relocation]
12 [--no-kill-null-pages] [--stylesheet=name] [--no-pdf-output]
13 [--pdf-output=name] [--no-reference-dictionary]
14 [--reference-dictionary=name] [--report-progress]
15 [--keep-temporary-files] file ...
16 pdfroff -h | --help
17 pdfroff -v | --version [option ...]
18
20 pdfroff is a wrapper program for the GNU text processing system, groff.
21 It transparently handles the mechanics of multiple pass groff process‐
22 ing, when applied to suitably marked up groff source files, such that
23 tables of contents and body text are formatted separately, and are sub‐
24 sequently combined in the correct order, for final publication as a
25 single PDF document. A further optional “style sheet” capability is
26 provided; this allows for the definition of content which is required
27 to precede the table of contents, in the published document.
28
29 For each invocation of pdfroff, the ultimate groff output stream is
30 post-processed by the GhostScript interpreter, to produce a finished
31 PDF document.
32
33 pdfroff makes no assumptions about, and imposes no restrictions on, the
34 use of any groff macro packages which the user may choose to employ, in
35 order to achieve a desired document format; however, it does include
36 specific built in support for the pdfmark macro package, should the
37 user choose to employ it. Specifically, if the pdfhref macro, defined
38 in the pdfmark.tmac package, is used to define public reference marks,
39 or dynamic links to such reference marks, then pdfroff performs as many
40 preformatting groff passes as required, up to a maximum limit of four,
41 in order to compile a document reference dictionary, to resolve refer‐
42 ences, and to expand the dynamically defined content of links.
43
45 The command line is parsed in accordance with normal GNU conventions,
46 but with one exception — when specifying any short form option (i.e., a
47 single character option introduced by a single hyphen), and if that
48 option expects an argument, then it must be specified independently
49 (i.e., it may not be appended to any group of other single character
50 short form options).
51
52 Long form option names (i.e., those introduced by a double hyphen) may
53 be abbreviated to their minimum length unambiguous initial substring.
54
55 Otherwise, pdfroff usage closely mirrors that of groff itself. Indeed,
56 with the exception of the -h, -v, and -T dev short form options, and
57 all long form options, which are parsed internally by pdfroff, all
58 options and file name arguments specified on the command line are
59 passed on to groff, to control the formatting of the PDF document.
60 Consequently, pdfroff accepts all options and arguments, as specified
61 in groff(1), which may also be considered as the definitive reference
62 for all standard pdfroff options and argument usage.
63
65 pdfroff accepts all of the short form options (i.e., those introduced
66 by a single hyphen), which are available with groff itself. In most
67 cases, these are simply passed transparently to groff; the following,
68 however, are handled specially by pdfroff.
69
70 -h Same as --help; see below.
71
72 -i Process standard input, after all other specified input files.
73 This is passed transparently to groff, but, if grouped with
74 other options, it must be the first in the group. Hiding it
75 within a group breaks standard input processing, in the multiple
76 pass groff processing context of pdfroff.
77
78 -T dev Only -T ps is supported by pdfroff. Attempting to specify any
79 other device causes pdfroff to abort.
80
81 -v Same as --version; see below.
82
83 See groff(1) for a description of all other short form options, which
84 are transparently passed through pdfroff to groff.
85
86 All long form options (i.e., those introduced by a double hyphen) are
87 interpreted locally by pdfroff; they are not passed on to groff, unless
88 otherwise stated below.
89
90 --help Causes pdfroff to display a summary of the its usage syntax, and
91 supported options, and then exit.
92
93 --emit-ps
94 Suppresses the final output conversion step, causing pdfroff to
95 emit PostScript output instead of PDF. This may be useful, to
96 capture intermediate PostScript output, when using a specialised
97 postprocessor, such as gpresent for example, in place of the
98 default GhostScript PDF writer.
99
100 --keep-temporary-files
101 Suppresses the deletion of temporary files, which normally
102 occurs after pdfroff has completed PDF document formatting; this
103 may be useful, when debugging formatting problems.
104
105 See section FILES, for a description of the temporary files used
106 by pdfroff.
107
108 --no-pdf-output
109 May be used with the --reference-dictionary=name option
110 (described below) to eliminate the overhead of PDF formatting,
111 when running pdfroff to create a reference dictionary, for use
112 in a different document.
113
114 --no-reference-dictionary
115 May be used to eliminate the overhead of creating a reference
116 dictionary, when it is known that the target PDF document con‐
117 tains no public references, created by the pdfhref macro.
118
119 --no-toc-relocation
120 May be used to eliminate the extra groff processing pass, which
121 is required to generate a table of contents, and relocate it to
122 the start of the PDF document, when processing any document
123 which lacks an automatically generated table of contents.
124
125 --no-kill-null-pages
126 While preparing for simulation of the manual collation step,
127 which is traditionally required to relocate of a table of con‐
128 tents to the start of a document, pdfroff accumulates a number
129 of empty page descriptions into the intermediate PostScript out‐
130 put stream. During the final collation step, these empty pages
131 are normally discarded from the finished document; this option
132 forces pdfroff to leave them in place.
133
134 --pdf-output=name
135 Specifies the name to be used for the resultant PDF document; if
136 unspecified, the PDF output is written to standard output. A
137 future version of pdfroff may use this option, to encode the
138 document name in a generated reference dictionary.
139
140 --reference-dictionary=name
141 Specifies the name to be used for the generated reference dic‐
142 tionary file; if unspecified, the reference dictionary is cre‐
143 ated in a temporary file, which is deleted when pdfroff com‐
144 pletes processing of the current document. This option must be
145 specified, if it is desired to save the reference dictionary,
146 for use in references placed in other PDF documents.
147
148 --report-progress
149 Causes pdfroff to display an informational message on standard
150 error, at the start of each groff processing pass.
151
152 --stylesheet=name
153 Specifies the name of an input file, to be used as a style sheet
154 for formatting of content, which is to be placed before the ta‐
155 ble of contents, in the formatted PDF document.
156
157 --version
158 Causes pdfroff to display a version identification message. The
159 entire command line is then passed transparently to groff, in a
160 one pass operation only, in order to display the associated
161 groff version information, before exiting.
162
164 The following environment variables may be set, and exported, to modify
165 the behaviour of pdfroff.
166
167 PDFROFF_COLLATE
168 Specifies the program to be used for collation of the finshed
169 PDF document.
170
171 This collation step may be required to move tables of contents
172 to the start of the finished PDF document, when formatting with
173 traditional macro packages, which print them at the end. How‐
174 ever, users should not normally need to specify PDFROFF_COLLATE,
175 (and indeed, are not encouraged to do so). If unspecified,
176 pdfroff uses sed(1) by default, which normally suffices.
177
178 If PDFROFF_COLLATE is specified, then it must act as a filter,
179 accepting a list of file name arguments, and write its output to
180 the stdout stream, whence it is piped to the
181 PDFROFF_POSTPROCESSOR_COMMAND, to produce the finished PDF out‐
182 put.
183
184 When specifying PDFROFF_COLLATE, it is normally necessary to
185 also specify PDFROFF_KILL_NULL_PAGES.
186
187 PDFROFF_COLLATE is ignored, if pdfroff is invoked with the
188 --no-kill-null-pages option.
189
190 PDFROFF_KILL_NULL_PAGES
191 Specifies options to be passed to the PDFROFF_COLLATE program.
192
193 It should not normally be necessary to specify
194 PDFROFF_KILL_NULL_PAGES. The internal default is a sed(1)
195 script, which is intended to remove completely blank pages from
196 the collated output stream, and which should be appropriate in
197 most applications of pdfroff. However, if any alternative to
198 sed(1) is specified for PDFROFF_COLLATE, then it is likely that
199 a corresponding alternative specification for
200 PDFROFF_KILL_NULL_PAGES is required.
201
202 As in the case of PDFROFF_COLLATE, PDFROFF_KILL_NULL_PAGES is
203 ignored, if pdfroff is invoked with the --no-kill-null-pages
204 option.
205
206 PDFROFF_POSTPROCESSOR_COMMAND
207 Specifies the command to be used for the final document conver‐
208 sion from PostScript intermediate output to PDF. It must behave
209 as a filter, writing its output to the stdout stream, and must
210 accept an arbitrary number of files ... arguments, with the spe‐
211 cial case of - representing the stdin stream.
212
213 If unspecified, PDFROFF_POSTPROCESSOR_COMMAND defaults to
214
215 gs -dBATCH -dQUIET -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=-
216
217 GROFF_TMPDIR
218 Identifies the directory in which pdfroff should create tempo‐
219 rary files. If GROFF_TMPDIR is not specified, then the vari‐
220 ables TMPDIR, TMP and TEMP are considered in turn, as possible
221 temporary file repositories. If none of these are set, then
222 temporary files are created in the current directory.
223
224 GROFF_GHOSTSCRIPT_INTERPRETER
225 Specifies the program to be invoked, when pdfroff converts groff
226 PostScript output to PDF. If PDFROFF_POSTPROCESSOR_COMMAND is
227 specified, then the command name it specifies is implicitly as‐
228 signed to GROFF_GHOSTSCRIPT_INTERPRETER, overriding any explicit
229 setting specified in the environment. If
230 GROFF_GHOSTSCRIPT_INTERPRETER is not specified, then pdfroff
231 searches the process PATH, looking for a program with any of the
232 well known names for the GhostScript interpreter; if no Ghost‐
233 Script interpreter can be found, pdfroff aborts.
234
235 GROFF_AWK_INTERPRETER
236 Specifies the program to be invoked, when pdfroff is extracting
237 reference dictionary entries from a groff intermediate message
238 stream. If GROFF_AWK_INTERPRETER is not specified, then pdfroff
239 searches the process PATH, looking for any of the preferred pro‐
240 grams, `gawk', `mawk', `nawk' and `awk', in this order; if none
241 of these are found, pdfroff issues a warning message, and con‐
242 tinue processing; however, in this case, no reference dictionary
243 is created.
244
245 OSTYPE Typically defined automatically by the operating system, OSTYPE
246 is used on Microsoft Win32/MS-DOS platforms only, to infer the
247 default PATH_SEPARATOR character, which is used when parsing the
248 process PATH to search for external helper programs.
249
250 PATH_SEPARATOR
251 If set, PATH_SEPARATOR overrides the default separator charac‐
252 ter, (`:' on POSIX/UNIX systems, inferred from OSTYPE on Micro‐
253 soft Win32/MS-DOS), which is used when parsing the process PATH
254 to search for external helper programs.
255
256 SHOW_PROGRESS
257 If this is set to a non-empty value, then pdfroff always behaves
258 as if the --report-progress option is specified, on the command
259 line.
260
262 Input and output files for pdfroff may be named according to any con‐
263 vention of the user's choice. Typically, input files may be named ac‐
264 cording to the choice of the principal formatting macro package, e.g.,
265 file.ms might be an input file for formatting using the ms macros
266 (s.tmac); normally, the final output file should be named file.pdf.
267
268 Temporary files, created by pdfroff, are placed in the directory speci‐
269 fied by environment variables (see section ENVIRONMENT), and named ac‐
270 cording to the convention pdf$$.*, where $$ is the standard shell vari‐
271 able representing the process ID of the pdfroff process itself, and *
272 represents any of the extensions used by pdfroff to identify the fol‐
273 lowing temporary and intermediate files.
274
275 pdf$$.tmp
276 A scratch pad file, used to capture reference data emitted by
277 groff, during the reference dictionary compilation phase.
278
279 pdf$$.ref
280 The reference dictionary, as compiled in the last but one pass
281 of the reference dictionary compilation phase; (at the start of
282 the first pass, this file is created empty; in successive pass‐
283 es, it contains the reference dictionary entries, as collected
284 in the preceding pass).
285
286 If the --reference-dictionary=name option is specified, this in‐
287 termediate file becomes permanent, and is named name, rather
288 than pdf$$.ref.
289
290 pdf$$.cmp
291 Used to collect reference dictionary entries during the active
292 pass of the reference dictionary compilation phase. At the end
293 of any pass, when the content of pdf$$.cmp compares as identical
294 to pdf$$.ref, (or the corresponding file named by the
295 --reference-dictionary=name option), then reference dictionary
296 compilation is terminated, and the document reference map is ap‐
297 pended to this intermediate file, for inclusion in the final
298 formatting passes.
299
300 pdf$$.tc
301 An intermediate PostScript file, in which “Table of Contents”
302 entries are collected, to facilitate relocation before the body
303 text, on ultimate output to the GhostScript postprocessor.
304
305 pdf$$.ps
306 An intermediate PostScript file, in which the body text is col‐
307 lected prior to ultimate output to the GhostScript postproces‐
308 sor, in the proper sequence, after pdf$$.tc.
309
311 See groff(1) for the definitive reference to document formatting with
312 groff. Since pdfroff provides a superset of all groff capabilities,
313 groff(1) may also be considered to be the definitive reference to all
314 standard capabilities of pdfroff, with this document providing the ref‐
315 erence to pdfroff's extended features.
316
317 While pdfroff imposes neither any restriction on, nor any requirement
318 for, the use of any specific groff macro package, a number of supplied
319 macro packages, and in particular those associated with the package
320 pdfmark.tmac, are best suited for use with pdfroff as the preferred
321 formatter. Detailed documentation on the use of these packages may be
322 found, in PDF format, in the reference guide “Portable Document Format
323 Publishing with GNU Troff”, included in the installed documentation set
324 as /usr/share/doc/groff/1.20.1/pdf/pdfmark.pdf.
325
327 Copyright © 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
328
329 This man page is distributed under the terms of the GNU Free Documenta‐
330 tion License (FDL), version 1.3 or later, and is part of the GNU troff
331 software package. It was originally written by Keith Marshall
332 ⟨keith.d.marshall@ntlworld.com⟩, who also wrote the implementation of
333 the pdfroff program, to which it relates.
334
335 You should have received a copy of the FDL as part of the GNU troff
336 distribution; it is also available on-line, at the GNU copyleft site
337 ⟨http://www.gnu.org/copyleft/fdl.html⟩.
338
339
340
341Groff Version 1.20.1 9 January 2009 PDFROFF(1)