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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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