Skip to main content

A Python-based tool converting a text file to a PDF file

Project description

Text File to PDF

text-file-to-pdf-ci Supported Python Versions PyPI version PyPI Downloads

Install package

You can install text-file-to-pdf from source.

Option 1 - from PyPi

# Create the virtual environment
python3 -m venv .venv

# Activate the virtual environment
. .venv/bin/activate

pip install text-file-to-pdf

Option 2 - from source - for development

git clone https://github.com/TruckCab/text-file-to-pdf.git

cd text-file-to-pdf

# Create the virtual environment
python3 -m venv .venv

# Activate the virtual environment
. .venv/bin/activate

# Upgrade pip, setuptools, and wheel
pip install --upgrade pip setuptools wheel

# Install text-file-to-pdf - in editable mode with dev dependencies
pip install --editable .[dev]

Note

For the following commands - if you running from source and using --editable mode (for development purposes) - you will need to set the PYTHONPATH environment variable as follows:

export PYTHONPATH=$(pwd)/src

Usage

Help

text-file-to-pdf --help
Usage: text-file-to-pdf [OPTIONS]

Options:
  --version / --no-version        Prints the "Text File to PDF" program
                                  version and exits.  [required]
  --input-file TEXT               The input text file to convert to PDF
                                  format.  The path can be relative or
                                  absolute.  [required]
  --output-file TEXT              The output PDF file to create.  The path can
                                  be relative or absolute.  [required]
  --orientation [portrait|landscape]
                                  The page orientation to use for the PDF
                                  file.  [required]
  --format [a3|a4|a5|letter|legal]
                                  The page (paper) format for the PDF file.
                                  [default: letter; required]
  --font-name [courier|helvetica|times]
                                  The font to use in the PDF file.  [default:
                                  courier; required]
  --font-size INTEGER             The font-size to use in the PDF file.
                                  [default: 9; required]
  --help                          Show this message and exit.

Handy development commands

Version management

Bump the version of the application - (you must have installed from source with the [dev] extras)
bumpver update --patch

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text_file_to_pdf-0.0.7.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

text_file_to_pdf-0.0.7-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file text_file_to_pdf-0.0.7.tar.gz.

File metadata

  • Download URL: text_file_to_pdf-0.0.7.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for text_file_to_pdf-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ab0b30a1bcde0812b9da08d01391f9441496f4d3b9a86ebdea5a5ef4fd9c7262
MD5 84c7b090f917bf4c93155bc05362eff0
BLAKE2b-256 a90107270e8f8348888a4a722dce6c3fb17964da223aaacb21a6557a8f23e53c

See more details on using hashes here.

File details

Details for the file text_file_to_pdf-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for text_file_to_pdf-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 da0c21407fb6a1485d547b9053d3b0048c4f5d7e6ffb8c0b17a29a8a381a1df8
MD5 ed08337f20f8c8bbc570b6c7c9bc5a94
BLAKE2b-256 4d0751245e7dd87b074f0a78e007368e756bda1f437769a38b3015f8528f4ecc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page