PDFPipe
A command-line tool in Python. Pass it one or more text files, or pipe something from stdin, and it will produce a text-only PDF file.
Handy for quickly printing plain text content in a clean and predictable format. Specify font, font size, orientation and paper size from the command line.
Installation
Grab the file pdfpipe.py and execute it, or:
pip install pdfpipe
Or, you can download the source and
python setup.py install
or
sudo python setup.py install
if required.
Command-Line Usage
In your command-line:
echo "Hello from a PDF file named output.pdf" | pdfpipe.py
Or
pdfpipe.py -p -b -o printable.pdf -s 14 -g Letter --title "Reports for today" report*.txt
Type
pdfpipe.py --help
for more information on the available options.
Fonts and Unicode
The FPDF library knows about the following font families:
Courier, Arial, Times, Symbol, ZapfDingbats
Which can all be chosen as the font with the -f option. By default, Courier will be used for the monospace font, Arial (helvetica) for proportional (-p).
If you need to print non-latin text, or want a different font for any other reason, instead specify the full path to a TTF font file. E.g.:
./pdfpipe.py unicode_text.txt -f "/Library/Fonts/Arial Unicode.ttf"
Metadata
Release files for pdfpipe 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pdfpipe-1.0.1.tar.gz | 4.4 kB | Details |
Release files / pdfpipe-1.0.1.tar.gz
| Download URL | pdfpipe-1.0.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ca64aed96f92944c4face2dc8ca4fab339ef235714b18c07c7ca84f7d1cecf5
|
|
BLAKE2b-256 checksum How to use checksums |
a614c4667830370bdffce202e10e39e6ee69957d7f161b9352af7063b4bc01e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |