Solved

extracting pdf info

Posted on 2012-03-26
6
337 Views
Last Modified: 2012-03-27
Hi all,

I'm working with a non profit and need your help....i have to extract one piece of printed text from a pdf file on each page and save that page to a file name based on the extracted data.

Can anyone give me a starting point?

Thanks!
Zack
0
Comment
Question by:zack4x4
  • 3
  • 3
6 Comments
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 37771266
Can  you please provide a little bit more information about what you need to do.
0
 
LVL 4

Author Comment

by:zack4x4
ID: 37771563
Sure!  There is basically about 100 pages.  In the upper right hand corner of each pdf there is a city name.  I need to take each page, extract that city name and take that individual page save it to a new file with that city name as the file.

Thanks
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 37771677
This problem does not have a straight forward solution... You need to find out - based on context - what the city name is. PDF does not have a good way to identify objects on a page, so you need to get all the text from the page, and then compare the position of the text to where you would expect the city name to be.

What tools do you want to use?

Do you have any experience with JavaScript? Acrobat allows you to write a JavaScript program that can extract all the text on a page, and it will present that text word by word with location information. Take a look at the Doc level functions getPageNumWords, getPageNthWord and getPageNthWordQuads. You then have to compare the words and locations you find to the area that you are interested in, and once you've identified the city (e.g. based on words that are around the city name), you need to save the page. JS also provides functions to do that.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Author Comment

by:zack4x4
ID: 37772062
I have a little experience with javascript.  I know PHP and perl.  Ok will look at those functions.
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 500 total points
ID: 37772109
You can find the Acrobat JavaScript reference here:
http://livedocs.adobe.com/acrobat_sdk/10/Acrobat10_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?href=JS_Dev_Overview.71.1.html&accessible=true
You may have to click on the button on the upper left corner to get the navigation tree.
0
 
LVL 4

Author Closing Comment

by:zack4x4
ID: 37772136
ok appreciate it!  will check into it thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe A recent question here at Experts Exchange piqued my interest, so I decided to provide a thorough solution and publ…
PaperPort is a popular document imaging/management product from Nuance Communications (http://www.nuance.com/). It is in widespread use by both individuals (http://www.nuance.com/for-individuals/by-product/paperport/index.htm) and businesses (http:/…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question