About this document
PDF to Text Conversion in Python by Pranil Choudhari is a document available to read on EtoBox.
This document contains Python code to extract text from a PDF file, open a text file, and convert the text to a new PDF file. The code uses PyPDF2 to extract text from a selected PDF file. It then defines a function to take the text file as a parameter, add the text to a new PDF using FPDF with different fonts for short and long text, and save the output as a new PDF file. The code opens a sample text file and calls the conversion function to generate the new PDF.
- Author
- Pranil Choudhari
- Language
- EN