All,
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:
text.append(element.GetTextString())
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.
Any ideas?
Spencer Rathbun
IT/Programming
L & D Mail Masters, Inc.
110 Security Parkway
New Albany, IN 47150
Phone: 812.981.7161
Fax: 812.981.7169
srathbun@ldmailmasters.com