PAPS(1)
๐ PAPS โ section 1, General Commands Manual ๐
okay bestie, sit down, hydrate, and let me tell you about paps โ she's a text-to-PostScript converter and she is THAT girl. ๐ซถ
โจ NAME โจ
paps โ text to PostScript converter using Pango ๐ธ
๐ SYNOPSIS ๐
paps [options] files...
๐ฆ DESCRIPTION ๐ฆ
paps reads an input file and writes a PostScript language or user specified format rendering of that file to standard output. She takes international text in any locale, no cap, and she does internationalized text layout โ that means text shaping and bidirectional text rendering. ๐
If you don't hand her a filename argument, paps reads the standard input. And if standard input happens to be a terminal, your input is terminated by an EOF signal, usually Control-d. (iykyk ๐)
โจ OPTIONS โจ
paps follows the usual GNU command line syntax, and long options start with two dashes. Here's the full rundown, bestie โ nothing skipped, everything's here. ๐
-h,--helpโ shows a summary of the options. your little cheat sheet ๐--landscapeโ landscape output. default is portrait.--columns=clโ format the output into cl columns. default is1.
heads up: this option is not related to terminal length the way people mean when they say "80 columns terminal". different thing entirely, don't get it twisted ๐
--font=descโ use a font based on the description desc. default is"Monospace 12". the format of the string representation is:
"[family-list] [style-options] [size]"
where family-list is a comma separated list of families, optionally terminated by a comma; style-options is a whitespace separated list of words where each word describes one of style, variant, weight, or stretch; and size is a decimal number for size in points, e.g. "Courier,Monospace Bold Italic 10". slay โจ
-o,--output=fileโ output file. default isstdout. the output format gets set based on the file's extension when--formatisn't provided. ๐--rtlโ do right-to-left (RTL) text layout and align the text to the right. text direction is detected automatically. use this option when you want explicit RTL layout and right alignment.--justifyโ justify the layout. stretches complete lines to fill the entire width. main character energy, filling the whole page fr fr.--wrap=wmโ use line wrapping mode wm. default isword-char.wordโ wrap lines at word boundariescharโ wrap lines at character boundariesword-charโ wrap lines at word boundaries, but fall back to character boundaries if there isn't enough space for a full word
--show-wrapโ mark wrapped lines with special characters. ๐--paper=psโ choose the paper size. accepted paper sizes are'legal','letter','A3'and'A4'. default isA4.--gravity=grโ set the base glyph orientation. default isauto.southโ glyphs stand uprighteastโ glyphs are rotated 90 degrees clockwisenorthโ glyphs are upside-downwestโ glyphs are rotated 90 degrees counter-clockwiseautoโ gravity is resolved from the context
--gravity-hint=ghโ set how horizontal scripts behave in a vertical context. default isnatural.naturalโ scripts will take their natural gravity based on the base gravity and the scriptstrongโ always use the base gravity, regardless of the scriptlineโ for scripts not in their natural direction (e.g. Latin in East gravity), choose per-script gravity such that every script respects the line progression. this means Latin and Arabic will take opposite gravities and both flow top-to-bottom, for example.
--format=fmtโ choose the output format. default isps.psโ PostScriptpdfโ Portable Document Formatsvgโ Scalable Vector Graphics
๐ Postscript points
Each postscript point equals to 1/72 of an inch. 36 points are 1/2 of an inch. (math girlies stay winning ๐งฎโจ)
--bottom-margin=bmโ set the bottom margin. default is 36 postscript points.--top-margin=tmโ set the top margin. default is 36 postscript points.--left-margin=lmโ set the left margin. default is 36 postscript points.--right-margin=rmโ set the right margin. default is 36 postscript points.--gutter-width=gwโ set the gutter width. default is 40 postscript points.--headerโ draw a page header with the document name, date and page number for each page. the header is not printed by default.--header-left=fmtโ sets the formatting for the left side of the header. see FORMAT for an explanation of the header and footer formatting. default is the current localized date.--header-center=fmtโ sets the formatting for the center of the header. see FORMAT for an explanation of the header and footer formatting. default is the filename.--header-right=fmtโ sets the formatting for the center of the header. see FORMAT for an explanation of the header and footer formatting. default is the Page number.--footerโ draw a page footer with the document name, date and page number for each page. the footer is not printed by default.--footer-left=fmtโ sets the formatting for the left side of the footer. see FORMAT for an explanation of the footer and footer formatting. the default formatting is an empty string.--footer-center=fmtโ sets the formatting for the center of the footer. see FORMAT for an explanation of the footer and footer formatting. the default formatting is an empty string.--footer-right=fmtโ sets the formatting for the center of the footer. see FORMAT for an explanation of the footer and footer formatting. the default formatting is an empty string.--title="text"โ use text as the title string for the page header. by default the input filename or"stdin"is used.--markupโ interpret the input as pango markup. the Pango Text Attribute Markup Language lets you mark parts of the text with tags that define additional attributes such as font face, size, weight, colors, or text decoration like underline or strikethrough. โจ--encoding=encโ assume the encoding of the input text is enc. by default the encoding of the current locale is used (e.g.UTF-8).--lpi=linesโ set the number of lines per inch. this determines the line spacing.--cpi=charsโ set the number of characters per inch. this is an alternative method of specifying the font size.--g-fatal-warningsโ make all glib warnings fatal. ๐
๐ฆ EXIT STATUS ๐ฆ
the following exit values are returned:
0โ successful completion.1โ an error occurred.
๐ HEADER AND FOOTER FORMATTING ๐
the header and footers may be formatted by a mini language based on the python f-strings. ๐
text outside of squiggly brackets is entered literally in the output. text inside squiggly brackets contains one of the following predefined list of variables:
nowโ the current timemtimeโ the modification time of the file being printedpage_idxโ the page index of the pagenum_pagesโ the total number of pages in the documentfilenameโ the filename (basename) of the documentpathโ the full path of the document
๐ EXAMPLES ๐
Example 1 โ Printing UTF-8 text file
the following command can be used to print a file in any of the UTF-8 based locales, if the file is in UTF-8 or a compatible codeset.
$ paps en_US_UTF-8.txt
by default paps will print a PostScript rendering to standard output. send the output to a printer using lp:
$ paps en_US_UTF-8.txt | lp
or to a file using redirection or the -o option:
$ paps en_US_UTF-8.txt > out.ps
$ paps -o out.ps en_US_UTF-8.txt
Example 2 โ Specify encoding
to print a file in a specific encoding regardless of the current locale setting, use the --encoding option. here's an example for a Japanese EUC encoded input file:
$ paps --encoding eucjp ja_JP_eucjp.txt > out.ps
paps will still use the current locale setting to prioritize the available fonts for the current language. ๐
Example 3 โ Specify locale
override the LC_ALL environment variable to run paps in a different locale.
$ LC_ALL=ja_JP.eucjp paps ja_JP_eucjp.txt > out.ps
here paps will assume the input is in Japanese EUC encoding and will use the Japanese eucjp locale to render the output. if --header is added, the date is printed in Japanese. ๐ฏ๐ต
Example 4 โ Change the header and footer
override the header and the footer to show only the page in the middle of the footer.
$ paps --separation-lines -o /tmp/foo.pdf --header --header-left='' \
--header-center='{path}' --header-right='' --footer \
--footer-left='Printed {now:%c}' \
--footer-right='Page {page_idx}/{num_pages}' \
`pwd`/paps.ccx
and here's the paragraph that comes with this example, word for word, because we keep everything around here:
herepapswill assume the input is in Japanese EUC encoding and will use the Japanese eucjp locale to render the output. if--headeris added, the date is printed in Japanese.
๐ธ ENVIRONMENT VARIABLES ๐ธ
paps uses locale environment variables to determine her behavior. the following categories are used:
LC_CTYPEโ to assume the encoding of the input. this can be overridden by--encoding.LC_TIMEโ to format the date for the header.
font selection is also affected by the current locale. Example 3 describes how to run paps in a different locale. ๐
๐ SEE ALSO ๐
fc-match(1), setlocale(3C)
๐ AUTHOR ๐
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>.
this manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others).
okay that's the whole page, bestie, and here's your cute little sign-off: this one comes from the General Commands Manual and it's dated December 20, 2022. ๐ go print something pretty, you've got this ๐ซถโจ๐
๐ฆ where this page comes from
- centos-stream 10: paps 0.8.0-10.el10 ยท LGPL-2.0-or-later
- fedora 43: paps 0.8.0-14.fc43 ยท LGPL-2.0-or-later
- fedora 44: paps 0.8.0-15.fc44 ยท LGPL-2.0-or-later
- nixos 26.05: paps 0.8.0
- nixpkgs unstable: paps 0.8.0
- ubuntu stonking: paps 0.8.0-0.1 ยท LGPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms