]> arthur.ath.cx Git - pdfman.git/blob - README.md
f40f599b7cdb1437201edd7a25891fdff15abce0
[pdfman.git] / README.md
1 # pdfman: View UNIX manual pages as Portable Document Format (PDF) files
2
3 `pdfman` converts UNIX manual pages to PDF documents using Ghostscript's
4 `ps2pdf`(1) or Apple's `pstopdf`(1) command (included in macOS up to version 13
5 "Ventura") and displays them by calling `open`(1) on the resulting PDF file.
6 This enhances the useability of the manual pages quite a bit, because you now
7 can make use of your preferred PDF file viewer and all of its functionality.
8
9 The conversion is only done once and a cached PDF file gets used for subsequent
10 invocations for the same topic.
11
12 ## Prerequisites
13
14 The `pdfman` script makes use of the following tools, which need to be available
15 on the local system in the default search `$PATH`:
16
17 - `open`(1)
18 - Either `ps2pdf`(1) of the Ghostscript suite _or_ `pstopdf`(1) which was
19   included in Apple macOS up to version 13 "Ventura".
20
21 Note: `pdfman` silently falls back to "normal" `man`(1) behavior if any of the
22 required tools is _not_ found.
23
24 ## Usage
25
26 ```bash
27 pdfman [-v] [-T] [<section>] <topic> ...
28 pdfman <man(1) options> <arguments> ...
29 pdfman {--help|--version>}
30 ```
31
32 - `-v`: Enable verbose output.
33 - `-T`: Force regular `man`(1) behavior, don't use PDF files.
34
35 ### Hint
36
37 You can setup an alias from `man` to `pdfman` in your shell startup files to not
38 forget to use it :-)
39
40 ```bash
41 alias man=pdfman
42 ```