
When you create a different form, redo this task to enable Acrobat Reader users to use the tools. The tools are enabled for the current form only. Last_page.insertImage(image_rectangle, filename=f'image. To enable the Fill & Sign tools, choose File > Save As Other > Reader Extended PDF > Enable More Tools (includes Form Fill-in & Save). 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
