Here’s a simple Python script that might come in handy. I used it for some experiments and am posting it here in case I need it again in the future. Feel free to use it as well!
import PyPDF2
# Open the PDF file
pdf_file = open("example.pdf", "rb")
pdf_reader = PyPDF2.PdfReader(pdf_file)
# Get the AcroFields
acro_fields = pdf_reader.get_fields()
print("Form Field Names:")
for field_name in acro_fields.keys():
print(f"- {field_name}")
# Close the PDF file
pdf_file.close()
No comments:
Post a Comment