Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDF with formfields
#1
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
Reply
#2
maybe this may help https://stackoverflow.com/questions/3984...-in-python
particularly the accepted answer
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
(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
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020