Skip to content

This Python script converts a plain text file into a PDF document using the ReportLab library. It provides a simple command-line interface where users can specify the input text file and the desired output PDF file path.

License

Notifications You must be signed in to change notification settings

amphitter/Text-to-PDF-Convertor-Using-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text to PDF Converter

This Python script converts a plain text file into a PDF document using the ReportLab library.

Installation

  1. Make sure you have Python installed on your system. If not, you can download it from python.org.
  2. Install the required dependencies by running:
    pip install reportlab
    

Usage

  1. Clone this repository to your local machine or download the script text_to_pdf.py.
  2. Open a terminal or command prompt and navigate to the directory containing the script.
  3. Run the script by executing the following command:
    python text_to_pdf.py
    
  4. You will be prompted to enter the path of the text file you want to convert and the desired path for the PDF file.
  5. Once entered, the script will create a PDF file containing the text from the input file.

Example

Enter the path of the text file: input.txt
Enter the desired path for the PDF file: output.pdf
PDF created successfully!

Dependencies

  • Python 3.x
  • ReportLab

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This Python script converts a plain text file into a PDF document using the ReportLab library. It provides a simple command-line interface where users can specify the input text file and the desired output PDF file path.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages