![]() Pdf = PdfFileReader(open('blank.pdf','rb')) If some fields don't fill, you can use fitz ( pip install PyMuPDF) and PyPDF2 ( pip install PyPDF2) like the following altering the points as needed: import fitz # For radio boxes ('Off' = not filled, 'Yes' = filled)įillpdfs.write_fillable_pdf('blank.pdf', 'new.pdf', data_dict)įillpdfs.flatten_pdf('new.pdf', 'newflat.pdf') # Set the returned dictionary values a save to a variable ![]() I wrote a library built upon:'pdfrw', 'pdf2image', 'Pillow', 'PyPDF2' called fillpdf ( pip install fillpdf and poppler dependency conda install -c conda-forge poppler)īasic usage: from fillpdf import fillpdfs
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |