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

NAME

6       paps - text to PostScript converter using Pango
7
8

SYNOPSIS

10       paps [options] files...
11
12

DESCRIPTION

14       paps reads an input file and writes a PostScript language or user spec‐
15       ified format rendering of the file to standard output. paps accepts in‐
16       ternational text in any locale and provides internationalized text lay‐
17       out including text shaping and bidirectional text rendering.
18
19       If no filename argument is provided, paps reads the standard input.  If
20       the standard input is a terminal, input is terminated by an EOF signal,
21       usually Control-d.
22
23

OPTIONS

25       paps follows the usual GNU  command  line  syntax,  with  long  options
26       starting with two dashes (`-'). A summary of options is included below.
27
28       -h, --help
29              Show summary of options.
30
31       --landscape
32              Landscape output. Default is portrait.
33
34       --columns=cl
35              Format output into cl columns. Default is 1.
36              Please  notice  this option isn't related to the terminal length
37              as in a "80 columns terminal".
38
39       --font=desc
40              Use font based on description desc. Default is  "Monospace  12".
41              The format of the string representation is:
42
43              "[family-list] [style-options] [size]"
44
45              where  family-list is a comma separated list of families option‐
46              ally terminated by a comma, style-options is a whitespace  sepa‐
47              rated  list  of  words  where  each word describes one of style,
48              variant, weight, or stretch, and size is a  decimal  number  for
49              size in points, e.g. "Courier,Monospace Bold Italic 10".
50
51       -o, --output=file
52              Output  file.  Default  is stdout. Output format is set based on
53              file's extension when --format is not provided.
54
55       --rtl  Do right-to-left (RTL) text layout and align text to the  right.
56              Text  direction  is  detected automatically. Use this option for
57              explicit RTL layout and right alignment.
58
59       --justify
60              Justify the layout. Stretch complete lines to  fill  the  entire
61              width.
62
63       --wrap=wm
64              Use line wrapping mode wm. Default is word-char.
65
66              word       Wrap lines at word boundaries
67
68              char       Wrap lines at character boundaries
69
70              word-char  Wrap lines at word boundaries, but fall back to char‐
71                         acter boundaries if there is not enough space  for  a
72                         full word
73
74       --show-wrap
75              Mark wrapped lines with special characters.
76
77       --paper=ps
78              Choose  paper  size. Accepted paper sizes are 'legal', 'letter',
79              'A3' and 'A4'.  Default is A4.
80
81       --gravity=gr
82              Set base glyph orientation. Default is auto.
83
84              south      Glyphs stand upright
85
86              east       Glyphs are rotated 90 degrees clockwise
87
88              north      Glyphs are upside-down
89
90              west       Glyphs are rotated 90 degrees counter-clockwise
91
92              auto       Gravity is resolved from the context
93
94
95       --gravity-hint=gh
96              Set how horizontal scripts behave in a vertical context. Default
97              is natural.
98
99              natural    Scripts  will take their natural gravity based on the
100                         base gravity and the script
101
102              strong     Always use the base gravity, regardless of the script
103
104              line       For scripts not  in  their  natural  direction  (e.g.
105                         Latin  in  East  gravity),  choose per-script gravity
106                         such that every script respects the line progression.
107                         This means, Latin and Arabic will take opposite grav‐
108                         ities and both flow top-to-bottom for example.
109
110       --format=fmt
111              Choose output format. Default is ps.
112
113              ps         PostScript
114
115              pdf        Portable Document Format
116
117              svg        Scalable Vector Graphics
118
119       Postscript points
120              Each postscript point equals to 1/72 of an inch. 36  points  are
121              1/2 of an inch.
122
123       --bottom-margin=bm
124              Set bottom margin. Default is 36 postscript points.
125
126       --top-margin=tm
127              Set top margin. Default is 36 postscript points.
128
129       --left-margin=lm
130              Set left margin. Default is 36 postscript points.
131
132       --right-margin=rm
133              Set right margin. Default is 36 postscript points.
134
135       --gutter-width=gw
136              Set gutter width. Default is 40 postscript points.
137
138       --header
139              Draw  page  header  with document name, date and page number for
140              each page. Header is not printed by default.
141
142       --header-left=fmt
143              Sets the formatting for the left side of the header. See  FORMAT
144              for  an explanation of the header and footer formatting. Default
145              is the current localized date.
146
147       --header-center=fmt
148              Sets the formatting for the center of the header. See FORMAT for
149              an  explanation  of the header and footer formatting. Default is
150              the filename.
151
152       --header-right=fmt
153              Sets the formatting for the center of the header. See FORMAT for
154              an  explanation  of the header and footer formatting. Default is
155              the Page number.
156
157       --footer
158              Draw page footer with document name, date and  page  number  for
159              each page. Footer is not printed by default.
160
161       --footer-left=fmt
162              Sets  the formatting for the left side of the footer. See FORMAT
163              for an explanation of the footer and footer formatting. The  de‐
164              fault formatting is an empty string.
165
166       --footer-center=fmt
167              Sets the formatting for the center of the footer. See FORMAT for
168              an explanation of the footer and footer formatting. The  default
169              formatting is an empty string.
170
171       --footer-right=fmt
172              Sets the formatting for the center of the footer. See FORMAT for
173              an explanation of the footer and footer formatting. The  default
174              formatting is an empty string.
175
176       --title="text"
177              Use text as the title string for page header. By default the in‐
178              put filename or "stdin" is used.
179
180       --markup
181              Interpret input as pango markup.  Pango  Text  Attribute  Markup
182              Language allows marking parts of the text with tags defining ad‐
183              ditional attributes such as font face, size, weight,  colors  or
184              text decoration such as underline or strikethrough.
185
186       --encoding=enc
187              Assume  encoding of the input text is enc. By default the encod‐
188              ing of the current locale is used (e.g. UTF-8).
189
190       --lpi=lines
191              Set number of lines per inch. This determines the line spacing.
192
193       --cpi=chars
194              Set number of characters per inch. This is an alternative method
195              of specifying the font size.
196
197       --g-fatal-warnings
198              Make all glib warnings fatal.
199
200

EXIT STATUS

202       The following exit values are returned:
203
204       0     Successful completion.
205
206       1     An error occurred.
207
208
210       The header and footers may be formatted by a mini language based on the
211       python f-strings. Text outside of squiggly brackets are entered  liter‐
212       ally  in  the  output. Text inside squiggly brackets contain one of the
213       following predefined list of variables:
214
215
216              now        The current time
217
218              mtime      The modification time of the file being printed
219
220              page_idx   The page index of the page
221
222              num_pages  The total number of pages in the document
223
224              filename   The filename (basename) of the document
225
226              path       The full path of the document
227
228

EXAMPLES

230       Example 1 Printing UTF-8 text file
231
232       The following command can be used to print a file in any of  the  UTF-8
233       based locales if the file is in UTF-8 or compatible codeset.
234
235         $ paps en_US_UTF-8.txt
236
237       By  default  paps  will  print PostScript rendering to standard output.
238       Send the output to a printer using lp
239
240         $ paps en_US_UTF-8.txt | lp
241
242       or to a file using redirection or the -o option
243
244         $ paps en_US_UTF-8.txt > out.ps
245         $ paps -o out.ps en_US_UTF-8.txt
246
247
248       Example 2 Specify encoding
249
250       To print a file in specific encoding regardless of the  current  locale
251       setting  use the --encoding option. An example for Japanese EUC encoded
252       input file:
253
254         $ paps --encoding eucjp ja_JP_eucjp.txt > out.ps
255
256       paps will still use current locale setting to prioritize the  available
257       fonts for current language.
258
259
260       Example 3 Specify locale
261
262       Override the LC_ALL environment variable to run paps in a different lo‐
263       cale.
264
265         $ LC_ALL=ja_JP.eucjp paps ja_JP_eucjp.txt > out.ps
266
267       Here paps will assume the input is in Japanese EUC  encoding  and  will
268       use  Japanese  eucjp locale to render the output. If --header is added,
269       the date is printed in Japanese.
270
271
272       Example 4 Change the header and footer
273
274       Override the header and the footer to show only the page in the  middle
275       of the footer.
276
277         $ paps --separation-lines -o /tmp/foo.pdf --header --header-left='' \
278          --header-center='{path}' --header-right='' --footer \
279          --footer-left='Printed {now:%c}' \
280          --footer-right='Page {page_idx}/{num_pages}' \
281          `pwd`/paps.ccx
282
283       Here  paps  will  assume the input is in Japanese EUC encoding and will
284       use Japanese eucjp locale to render the output. If --header  is  added,
285       the date is printed in Japanese.
286
287

ENVIRONMENT VARIABLES

289       paps  uses  locale environment variables to determine its behavior. The
290       following categories are used:
291
292       LC_CTYPE        to assume the encoding of the input. This can be  over‐
293                       ridden by --encoding.
294
295       LC_TIME         to format the date for header.
296
297       Font  selection is also affected by current locale. Example 3 describes
298       how to run paps in a different locale.
299
300

SEE ALSO

302       fc-match(1), setlocale(3C)
303
304

AUTHOR

306       paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>.
307
308       This manual page was written by Lior  Kaplan  <kaplan@debian.org>,  for
309       the Debian project (but may be used by others).
310
311
312
313                               December 20, 2022                       PAPS(1)
Impressum