Python Forum

Full Version: PDF with formfields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody,

I am fairly new in programming with Python.
I did some Java, Javascript and php before though.

I have a searchable PDF with a whole lot of formfields. Every formfield has an ID.
Let's say we don't know the names of the ID we just know they have an ID.

What I want to do is to loop through that PDF file and get the value from every formfield with an ID.

Is that possible?
Idealy the values get saved as a variable with the same name like the ID of the formfield.

At the moment I am very clueless tbh...

I hope someone can give me some advices.

With best regards
Asmodi
(Sep-18-2019, 08:29 AM)asmodi Wrote: [ -> ]Idealy the values get saved as a variable with the same name like the ID of the formfield.
You should be aware that creating variable names dynamically is really bad idea... Use proper data structure like list, dict, etc.
Most recent discussion on this with some useful links: https://python-forum.io/Thread-dynamical...-in-python