docstring python export to pdf code example
Example 1: pdf to string python
pip install PyPDF2
import PyPDF2
pdfFileObject=open(r"F:\fileName.pdf",'rb')
pdfReader = PyPDF2.PdfFileReader(pdfFileObject) //Creating reader obj
print(" No. Of Pages :", pdfReader.numPages)//To know no.of pages
Example 2: docx to pdf python
from docx2pdf import convert
convert("input.docx")
convert("input.docx", "output.pdf")
convert("my_docx_folder/")