1PDFROFF(1)                  General Commands Manual                 PDFROFF(1)
2
3
4

NAME

6       pdfroff - create PDF documents using groff
7

SYNOPSIS

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

DESCRIPTION

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

USAGE

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

OPTIONS

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

ENVIRONMENT

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  finished
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 -dSAFER -sDEVICE=pdfwrite
216                -sOutputFile=-
217
218       GROFF_TMPDIR
219              Identifies the directory in which pdfroff should create a subdi‐
220              rectory  for its temporary files.  If GROFF_TMPDIR is not speci‐
221              fied, then the variables TMPDIR, TMP and TEMP are considered  in
222              turn, as possible temporary file repositories.  If none of these
223              are set, then temporary files are created in a  subdirectory  of
224              /tmp.
225
226       GROFF_GHOSTSCRIPT_INTERPRETER
227              Specifies the program to be invoked, when pdfroff converts groff
228              PostScript output to PDF.  If  PDFROFF_POSTPROCESSOR_COMMAND  is
229              specified,  then the command name it specifies is implicitly as‐
230              signed to GROFF_GHOSTSCRIPT_INTERPRETER, overriding any explicit
231              setting      specified      in      the     environment.      If
232              GROFF_GHOSTSCRIPT_INTERPRETER is  not  specified,  then  pdfroff
233              searches the process PATH, looking for a program with any of the
234              well known names for the GhostScript interpreter; if  no  Ghost‐
235              Script interpreter can be found, pdfroff aborts.
236
237       GROFF_AWK_INTERPRETER
238              Specifies  the program to be invoked, when pdfroff is extracting
239              reference dictionary entries from a groff  intermediate  message
240              stream.  If GROFF_AWK_INTERPRETER is not specified, then pdfroff
241              searches the process PATH, looking for any of the preferred pro‐
242              grams,  ‘gawk’, ‘mawk’, ‘nawk’, and awk’, in this order; if none
243              of these are found, pdfroff issues a warning message,  and  con‐
244              tinue processing; however, in this case, no reference dictionary
245              is created.
246
247       OSTYPE Typically defined automatically by the operating system,  OSTYPE
248              is  used  on Microsoft Win32/MS-DOS platforms only, to infer the
249              default PATH_SEPARATOR character, which is used when parsing the
250              process PATH to search for external helper programs.
251
252       PATH_SEPARATOR
253              If  set,  PATH_SEPARATOR overrides the default separator charac‐
254              ter, (‘:’ on POSIX/UNIX systems, inferred from OSTYPE on  Micro‐
255              soft  Win32/MS-DOS), which is used when parsing the process PATH
256              to search for external helper programs.
257
258       SHOW_PROGRESS
259              If this is set to a non-empty value, then pdfroff always behaves
260              as  if the --report-progress option is specified, on the command
261              line.
262

FILES

264       Input and output files for pdfroff may be named according to  any  con‐
265       vention  of the user's choice.  Typically, input files may be named ac‐
266       cording to the choice of the principal formatting macro package,  e.g.,
267       file.ms  might  be  an  input  file  for formatting using the ms macros
268       (s.tmac); normally, the final output file should be named file.pdf.
269
270       Temporary files, created by pdfroff, are placed in the file system  hi‐
271       erarchy,  in  or below the directory specified by environment variables
272       (see section ENVIRONMENT).  If mktemp(1) is available, it is invoked to
273       create a private subdirectory of the nominated temporary files directo‐
274       ry,  (with  subdirectory  name  derived  from  the  template   pdfroff-
275       XXXXXXXXXX);  if  this subdirectory is successfully created, the tempo‐
276       rary files will be placed within it, otherwise they will be placed  di‐
277       rectly in the directory nominated in the environment.
278
279       All  temporary  files  themselves are named according to the convention
280       pdf$$.*, where $$ is  the  standard  shell  variable  representing  the
281       process  ID  of the pdfroff process itself, and * represents any of the
282       extensions used by pdfroff to identify the following temporary and  in‐
283       termediate files.
284
285       pdf$$.tmp
286              A  scratch  pad  file, used to capture reference data emitted by
287              groff, during the reference dictionary compilation phase.
288
289       pdf$$.ref
290              The reference dictionary, as compiled in the last but  one  pass
291              of  the reference dictionary compilation phase; (at the start of
292              the first pass, this file is created empty; in successive  pass‐
293              es,  it  contains the reference dictionary entries, as collected
294              in the preceding pass).
295
296              If the --reference-dictionary=name option is specified, this in‐
297              termediate  file  becomes  permanent,  and is named name, rather
298              than pdf$$.ref.
299
300       pdf$$.cmp
301              Used to collect reference dictionary entries during  the  active
302              pass  of the reference dictionary compilation phase.  At the end
303              of any pass, when the content of pdf$$.cmp compares as identical
304              to   pdf$$.ref,   (or   the  corresponding  file  named  by  the
305              --reference-dictionary=name option), then  reference  dictionary
306              compilation is terminated, and the document reference map is ap‐
307              pended to this intermediate file, for  inclusion  in  the  final
308              formatting passes.
309
310       pdf$$.tc
311              An  intermediate  PostScript  file, in which “Table of Contents”
312              entries are collected, to facilitate relocation before the  body
313              text, on ultimate output to the GhostScript postprocessor.
314
315       pdf$$.ps
316              An  intermediate PostScript file, in which the body text is col‐
317              lected prior to ultimate output to the  GhostScript  postproces‐
318              sor, in the proper sequence, after pdf$$.tc.
319

SEE ALSO

321       See  groff(1)  for the definitive reference to document formatting with
322       groff.  Since pdfroff provides a superset of  all  groff  capabilities,
323       groff(1)  may  also be considered to be the definitive reference to all
324       standard capabilities of pdfroff, with this document providing the ref‐
325       erence to pdfroff's extended features.
326
327       While  pdfroff  imposes neither any restriction on, nor any requirement
328       for, the use of any specific groff macro package, a number of  supplied
329       macro  packages,  and  in  particular those associated with the package
330       pdfmark.tmac, are best suited for use with  pdfroff  as  the  preferred
331       formatter.   Detailed documentation on the use of these packages may be
332       found, in PDF format, in the reference guide “Portable Document  Format
333       Publishing with GNU Troff”, included in the installed documentation set
334       as /usr/share/doc/groff/pdf/pdfmark.pdf.
335

COPYING

337       Copyright © 2005-2014 Free Software Foundation, Inc.
338
339       This file is part of groff, the free GNU roff type-setting system.
340
341       Permission is granted to copy, distribute and/or modify  this  document
342       under  the  terms  of the GNU Free Documentation License (FDL), Version
343       1.3 or any later version published by  the  Free  Software  Foundation;
344       with  no  Front-Cover Texts, no Back-Cover Texts, and the following In‐
345       variant Sections:--
346
347           a)  This "Legal Matters" section, extending from the definition of
348               .co to the end of the enclosing .au definition.
349
350           b) The entire sections bearing the heading "COPYING" and
351              "AUTHORS".
352
353       A copy of the Free Documentation License is included as a  file  called
354       FDL  in  the  main  directory  of  the groff source package, it is also
355       available in the internet at the GNU copyleft site ⟨http://www.gnu.org/
356       copyleft/fdl.html⟩.
357

AUTHORS

359       It   was   originally  written  by  Keith  Marshall  ⟨keith.d.marshall@
360       ntlworld.com⟩, who also wrote the implementation of  the  pdfroff  pro‐
361       gram, to which it relates.
362
363
364
365Groff Version 1.22.3             13 July 2018                       PDFROFF(1)
Impressum