I'm trying to read the contents of a pdf and extract the text. I need to save certain pieces of it for later. Going off the ElementReaderTest.py example, I've got a while loop across all the pages, which processes the elements and returns a list with all strings found:
Elif mytype == Element.e_text:
Where text was declared as a list earlier. This would work fine, except the list comes back empty. As far as I can determine, each new element is destroying the string I'm being returned. Python treats it as a regular string just fine, so I thought that using copy or deepcopy would give me a separate version, that wouldn't get wiped. But, it doesn't work. All I get out is a bunch of empty lists.
L & D Mail Masters, Inc.
110 Security Parkway
New Albany, IN 47150