LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 31 Mar 2006 11:10:16 -0500
Reply-To:   Nathaniel_Wooding@DOM.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <Nathaniel_Wooding@DOM.COM>
Subject:   Re: Convert PDF into Excel or SAS file
Comments:   To: Xiaobing Fang <xfang@LSU.EDU>
In-Reply-To:   <OF8CBC1585.9C08C05C-ON86257142.0057542A-86257142.00575437@lsu.edu>
Content-Type:   text/plain; charset="US-ASCII"

Xiaobing

I hope that your pdf was created with Adobe Acrobat or one of the other PDF writers. If it was created by scanning, you basically have a bitmap and you will need to use OCR software to convert it.

If you have a file created by Acrobat, etc, you have a couple options.

1) If you have a copy of Acrobat (not Acrobat Reader), you should be able to save it in a readable format ( I do not have Acrobat so I don't know the options).

2) There is software called GhostScript which is available on the web which will let you open a PDF and export it as a text file. This is a dos-type program so you will probably want to also download one of the GUI front ends such as GhostView. If you are only doing a couple PDFs, this is a good approach. Note, however, that what you will get is a txt file and you will still have to write SAS code to parse out the data.

3) If you have a bunch of PDFs, you may want to use an exe file included with Ghostscript called something like PS2ASC.EXC This can be invoked from withing a SAS session using the SAS X command to run the EXC and save the data in a file which SAS then uses. Package all this in a macro and invoke it for each PDF . This approach is described in my paper

http://www.vasug.org/Proceedings/2003-02/Presentations/EXTRACTING%20DATA%20FROM%20PDF%20FILES.doc

In this case, I needed to extract data from about 2000 pdfs.

I also gave a slightly updated version of this at SESUG last fall.

Nat Wooding

Xiaobing Fang <xfang@LSU.EDU> Sent by: "SAS(r) To Discussion" SAS-L@LISTSERV.UGA.EDU <SAS-L@LISTSERV.U cc GA.EDU> Subject Convert PDF into Excel or SAS file 03/31/2006 10:53 AM

Please respond to Xiaobing Fang <xfang@LSU.EDU>

Hi,

I have tables in PDF file and would like to input them into SAS for analysis. Does anyone have the experience of converting PDF into Excel or SAS? Which software? How accurate? Thanks.

Xiaobing

----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


Back to: Top of message | Previous page | Main SAS-L page