This Python script converts a plain text file into a PDF document using the ReportLab library.
- Make sure you have Python installed on your system. If not, you can download it from python.org.
- Install the required dependencies by running:
pip install reportlab
- Clone this repository to your local machine or download the script
text_to_pdf.py
. - Open a terminal or command prompt and navigate to the directory containing the script.
- Run the script by executing the following command:
python text_to_pdf.py
- You will be prompted to enter the path of the text file you want to convert and the desired path for the PDF file.
- Once entered, the script will create a PDF file containing the text from the input file.
Enter the path of the text file: input.txt
Enter the desired path for the PDF file: output.pdf
PDF created successfully!
- Python 3.x
- ReportLab
This project is licensed under the MIT License - see the LICENSE file for details.