word to pdf python code example
Example 1: pdf to text python
#!pip install tabula-py
import tabula
#read all table data
df = tabula.read_pdf("sample.pdf",pages=[1,2])
df[1]
#tabula.convert_into("sample.pdf", "sample.csv", output_format="csv")
Example 2: docx to pdf python
from docx2pdf import convert
convert("input.docx")
convert("input.docx", "output.pdf")
convert("my_docx_folder/")