extract pdf text with python
# pip install tika
from tika import parser
raw = parser.from_file('yourfile.pdf')
print(raw['content'])
extract pdf text with python
# pip install tika
from tika import parser
raw = parser.from_file('yourfile.pdf')
print(raw['content'])
convert txt to pdf python
pip install fpdf
from fpdf import FPDF
# save FPDF() class into
# a variable pdf
pdf = FPDF()
# Add a page
pdf.add_page()
# set style and size of font
# that you want in the pdf
pdf.set_font("Arial", size = 15)
# open the text file in read mode
f = open("myfile.txt", "r")
# insert the texts in pdf
for x in f:
pdf.cell(200, 10, txt = x, ln = 1, align = 'C')
# save the pdf with name .pdf
pdf.output("mygfg.pdf")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us