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]
  --unit [pt|mm|cm|in]            The units to use for the PDF.  [default: mm;
                                  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]
  --left-margin FLOAT             The left margin for the PDF - in cm.
                                  [default: 5.669291338582678; required]
  --top-margin FLOAT              The top margin for the PDF - in cm.
                                  [default: 9.921259842519683; 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.10.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_file_to_pdf-0.0.10-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: text_file_to_pdf-0.0.10.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for text_file_to_pdf-0.0.10.tar.gz
Algorithm Hash digest
SHA256 5af2d4ab48d8f0d3a416f3ed055d973d20897a8ab6ed0b2fa08c2ac1b2501ae8
MD5 e3e6bece365305da11c709bf0828f1cc
BLAKE2b-256 f6e258054401ab67cc4e066b18b23e38f9e516c4b29d113d57beb4a91a143789

See more details on using hashes here.

Provenance

The following attestation bundles were made for text_file_to_pdf-0.0.10.tar.gz:

Publisher: ci.yml on TruckCab/text-file-to-pdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for text_file_to_pdf-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 3042f38c77808ebe1a0ad66c145e7c18c2534d6844cf353306c39e22e67bd358
MD5 e34c55417bcefbec5b462f1a2fe4f15b
BLAKE2b-256 070ec6b7ba6768b654a77a7c9c79e3bad1ff118a0171371fd0de48bc042446fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for text_file_to_pdf-0.0.10-py3-none-any.whl:

Publisher: ci.yml on TruckCab/text-file-to-pdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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