Skip to Main Content

Java Programming


For appeals, questions and feedback, please email

PDFBox extracts text from interactive PDF fields but doesn't clear them after use.

user-9g89wJun 27 2023 — edited Jun 27 2023

I have a java program that imports an interactive PDF entry fields using the PDFBox 2.0.1 jar. It does extract the fields correctly and I can assign them to an array. The array is used to load the extracted info into a derby database. Extracting all works great. The problem is that I can not import another interactive pdf since the info in the previous pdf is still in cache memory. When I select IMPORT button to scan another Interactive PDF and initiating , the previously extracted info is still there and is output again. PDFBox just ignores the new pdf being scanned. I can exit the java program and reload it, and the PDFBox will work and extract the Interactive fields. But I have to exit the program each time I want to scan a new Interctive PDF. Attached is the program. I need to be able to upload multiple Interactive PDFs without having to exit and close the program. Please help. The txt file can be changed to “jar” by changing the file ending extention.




Post Details
Added on Jun 27 2023
1 comment