BookmarkSubscribeRSS Feed
kate-1mr
Obsidian | Level 7

Hello everybody 🙂!

Please help me to solve my problem. I want to convert  pdf to sas table.

How i can do this? Can I convert pdf to sas  table direcly in my sas stydio?

Thanks a lot!!

10 REPLIES 10
Cynthia_sas
SAS Super FREQ
Hi:
A PDF file is a proprietary DOCUMENT format, not a table format like Excel or a data structure. If you have the original file from which the PDF document was created, you should see whether that original data file is in a format that can be read and/or imported into SAS tabular format.
Cynthia
kate-1mr
Obsidian | Level 7
Hi! Thank you a lot for your attention to my problem, unfortunately I don't have original file.
kate-1mr
Obsidian | Level 7
Thank you very much for your answer!
You taught me a new way to read pdf, but I have 273 pages in pdf format, this is a very large document,
it is possible to use your method when reading large record?
if not, do you know another way or ways to solve my problem?
Thanks a lot for your attention to my problem!
Tom
Super User Tom
Super User

Search on-line for some tool that can attempt to convert the content of the PDF into text.  Then you can read the text into SAS.

kate-1mr
Obsidian | Level 7
Thanks you very much for your answer!
I will do so.
I thought there was a way to convert pdf directly to a sas table without additional conversion.
Thank you a lot for attention to my problem.
Patrick
Opal | Level 21

If the copy/paste clipboard method doesn't work then open source tools to look into for conversion of a pdf into text: Tika, PDFBox and Tabula.

 

I've used Tika and PDFBox in past projects successfully for such purposes. PDFBox was "better" suited for pdf documents because the Tika version at the time didn't deal nicely with a specific PDF tag. Never used Tabula but it sounds promising.

 

With PDFBox the whole PDF document got converted into a text file which we then parsed via SAS code (DataFlux actually) to extract what we needed. It will depend on the structure of your source PDF document how much work writing such text parsing code will be.

kate-1mr
Obsidian | Level 7
Thank you so much! I have not done this before but i will try!!
Kurt_Bremser
Super User

As long as the data fits into the clipboard, you should be good.

You may have to take care of extra lines caused by page breaks (and the header and footer lines).

kate-1mr
Obsidian | Level 7
Thank you so much! I understood!!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 1938 views
  • 7 likes
  • 5 in conversation