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
37       --font=desc
38              Use  font  based on description desc. Default is "Monospace 12".
39              The format of the string representation is:
40
41              "[family-list] [style-options] [size]"
42
43              where family-list is a comma separated list of families  option‐
44              ally  terminated by a comma, style-options is a whitespace sepa‐
45              rated list of words where each  word  describes  one  of  style,
46              variant,  weight,  or  stretch, and size is a decimal number for
47              size in points, e.g. "Courier,Monospace Bold Italic 10".
48
49       -o, --output=file
50              Output file. Default is stdout. Output format is  set  based  on
51              file's extension when --format is not provided.
52
53       --rtl  Do  right-to-left  text layout and align text to the right. Text
54              direction is detected automatically. Use  this  option  for  ex‐
55              plicit RTL layout and right alignment.
56
57       --justify
58              Justify  the  layout.  Stretch complete lines to fill the entire
59              width.
60
61       --wrap=wm
62              Use line wrapping mode wm. Default is word-char.
63
64              word       Wrap lines at word boundaries
65
66              char       Wrap lines at character boundaries
67
68              word-char  Wrap lines at word boundaries, but fall back to char‐
69                         acter  boundaries  if there is not enough space for a
70                         full word
71
72       --show-wrap
73              Mark wrapped lines with special characters.
74
75       --paper=ps
76              Choose paper size. Accepted paper sizes are  'legal',  'letter',
77              'a3' and 'a4'.  Default is A4.
78
79       --gravity=gr
80              Set base glyph orientation. Default is auto.
81
82              south      Glyphs stand upright
83
84              east       Glyphs are rotated 90 degrees clockwise
85
86              north      Glyphs are upside-down
87
88              west       Glyphs are rotated 90 degrees counter-clockwise
89
90              auto       Gravity is resolved from the context
91
92
93       --gravity-hint=gh
94              Set how horizontal scripts behave in a vertical context. Default
95              is natural.
96
97              natural    Scripts will take their natural gravity based on  the
98                         base gravity and the script
99
100              strong     Always use the base gravity, regardless of the script
101
102              line       For  scripts  not  in  their  natural direction (e.g.
103                         Latin in East  gravity),  choose  per-script  gravity
104                         such that every script respects the line progression.
105                         This means, Latin and Arabic will take opposite grav‐
106                         ities and both flow top-to-bottom for example.
107
108       --format=fmt
109              Choose output format. Default is ps.
110
111              ps         PostScript
112
113              pdf        Portable Document Format
114
115              svg        Scalable Vector Graphics
116
117       --bottom-margin=bm
118              Set  bottom  margin in postscript points (1/72 inch). Default is
119              36.
120
121       --top-margin=tm
122              Set top margin. Default is 36.
123
124       --left-margin=lm
125              Set left margin. Default is 36.
126
127       --right-margin=rm
128              Set right margin. Default is 36.
129
130       --header
131              Draw page header with document name, date and  page  number  for
132              each page. Header is not printed by default.
133
134       --title="text"
135              Use text as the title string for page header. By default the in‐
136              put filename or "stdin" is used.
137
138       --markup
139              Interpret input as pango markup.  Pango  Text  Attribute  Markup
140              Language allows marking parts of the text with tags defining ad‐
141              ditional attributes such as font face, size, weight,  colors  or
142              text decoration such as underline or strikethrough.
143
144       --encoding=enc
145              Assume  encoding of the input text is enc. By default the encod‐
146              ing of the current locale is used (e.g. UTF-8).
147
148       --lpi=lines
149              Set number of lines per inch. This determines the line spacing.
150
151       --cpi=chars
152              Set number of characters per inch. This is an alternative method
153              of specifying the font size.
154
155       --g-fatal-warnings
156              Make all glib warnings fatal.
157
158

EXIT STATUS

160       The following exit values are returned:
161
162       0     Successful completion.
163
164       1     An error occurred.
165
166

EXAMPLES

168       Example 1 Printing UTF-8 text file
169
170       The  following  command can be used to print a file in any of the UTF-8
171       based locales if the file is in UTF-8 or compatible codeset.
172
173         $ paps en_US_UTF-8.txt
174
175       By default paps will print PostScript  rendering  to  standard  output.
176       Send the output to a printer using lp
177
178         $ paps en_US_UTF-8.txt | lp
179
180       or to a file using redirection or the -o option
181
182         $ paps en_US_UTF-8.txt > out.ps
183         $ paps -o out.ps en_US_UTF-8.txt
184
185
186       Example 2 Specify encoding
187
188       To  print  a file in specific encoding regardless of the current locale
189       setting use the --encoding option. An example for Japanese EUC  encoded
190       input file:
191
192         $ paps --encoding eucjp ja_JP_eucjp.txt > out.ps
193
194       paps  will still use current locale setting to prioritize the available
195       fonts for current language.
196
197
198       Example 3 Specify locale
199
200       Override the LC_ALL environment variable to run paps in a different lo‐
201       cale.
202
203         $ LC_ALL=ja_JP.eucjp paps ja_JP_eucjp.txt > out.ps
204
205       Here  paps  will  assume the input is in Japanese EUC encoding and will
206       use Japanese eucjp locale to render the output. If --header  is  added,
207       the date is printed in Japanese.
208
209

ENVIRONMENT VARIABLES

211       paps  uses  locale environment variables to determine its behavior. The
212       following categories are used:
213
214       LC_CTYPE        to assume the encoding of the input. This can be  over‐
215                       ridden by --encoding.
216
217       LC_TIME         to format the date for header.
218
219       Font  selection is also affected by current locale. Example 3 describes
220       how to run paps in a different locale.
221
222

SEE ALSO

224       fc-match(1), setlocale(3C)
225
226

AUTHOR

228       paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>.
229
230       This manual page was written by Lior  Kaplan  <kaplan@debian.org>,  for
231       the Debian project (but may be used by others).
232
233
234
235                               October 12, 2015                        PAPS(1)
Impressum