Link to home
Start Free TrialLog in
Avatar of thomashospital
thomashospital

asked on

Reading string from PDF without searching whole file.

I am trying to strip a row of characters out of a PDF.  I have code that I obtained from this site, and it works well, but it loops through the whole file.  I would like to be able to stip characters from a certain part of the file everytime just to obtain an account number that constantly changes with each file.
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

You say...' I would like to be able to strip characters from a certain part of the file everytime just to obtain an account number that constantly changes with each file.'
Do you want to replace a account number?
do you want to just read account number ?
what are you wanting to do?
Avatar of thomashospital
thomashospital

ASKER

Sorry, I am wanting to read the account num into a variable then rename the file to match the account number.
I am pretty sure I can figure out the file rename part and if I cant I will ask in another question.  I just want to read the account number from the pdf at a certain location.
what are you using to read the PDF file?
I have something called pdfbox.
Do you have a pdf file that I can test with?
I will create a testing pdf.  How can I get it to you.
I have not looked but there is a way to post a file on EE for people to read.
It turns out that our problems run deeper than this solution.  Also I was having problems editing a PDF without posting patient information.  Do you have any example code that shows how to extract a string from any PDF so I can go ahead and give you the points for the solution?
All of the examples I have are made from the full version of Adobe Acrbat which can read all parts of a PDF file.
That is fine.
ASKER CERTIFIED SOLUTION
Avatar of Howard Cantrell
Howard Cantrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial