8

I'm looking for a program that can generate a CSV file from a scanned image or PDF containing a table

E.g. if the input is

a table with three columns

the ouput would be the corresponding CSV file:

AIDS Behav, 9712133, 2016
AIDS Care, 8915313, 2016
AIDS Educ Prev, 9002873, 2016 
...

And if possible:

  • free
  • works on Windows 7
  • takes different image format as well as PDF as input
  • 1
    Frank, you have a high rep on S.O, and your top tag is Python. Code a Python script to OCR it, break each line into words & the final two words are NimId & year added; everything before that is the Journal Abbreviation. It seems trivial to me. I know that time is short & you would prefer an off the shelf solution, but I suspect that you are going to have to roll your own :-/ – Mawg Jul 3 '17 at 10:28
4

I have found something amazing http://tabula.technology/ this is the best tool we have! It's also Free. It works really well with PDF files but even works fairly well with well formed tables like above that are images.

Awesome interface and great to use.

It is open source (MIT License) and the source code is available at https://github.com/tabulapdf/tabula

  • @mysusuf3 Do you have any results of their accuracy? – Ted Taylor of Life Jul 8 '17 at 11:10
  • @TedTaylorofLife if the data and text are encoded into pdf super high accuracy. – myusuf3 Jul 10 '17 at 21:18
3
+25

ABBYY FineReader does very good job when it comes to optical recognition. Probably the best on the market. And it can also export to *.csv, among many other formats. The downside is, it is not free and this particular version works on Windows only.

A different version for macOS exists, but it lacks many features and overall slower (subjectively) that a version for Windows. Earlier versions of FineReader are also known to work on Linux via Wine, though also being rather unstable.

Here is a program screenshot with your data:

enter image description here

That's is the result:

Journal Abbreviation,NlmlD,Y ear Added to MTIFL   
AIDS Behav,9712133,2016                           
AIDS Care,8915313,2016                            
AIDS Educ Prev,9002873,2016                       
AIDS Patient Care STDS,9607225,2016               
AJNR Am J Neuroradiol,8003708,2015                
ASAIO J,9204109,2016                              
Acad Emerg Med,9418450,2014                       
Acad Radiol,9440159,2016                          
Accid Anal Prev,1254476,2015                      
Acta Chir Iugosl,0372631,2015                     
Acta Clin Croat,9425483,2015                      
Acta Diabetol,9200299,2016                        
Acta Med Croatica,9208249,2015                    
Acta Med Iran,14540050R,2015                      
Acta Neurochir (Wien),0151000,2014                
Acta Neurol Scand,0370336,2015                    
Acta Odontol Scand,0370344,2015                   
Acta Psychol (Amst),0370366,2013                  
Acta Trop,0370374,2015                            
Adv Ther,8611864,2015                             
Ageing Res Rev,101128963,2016                     
Aging Clin Exp Res,101132995,2015                 
Aliment Pharmacol Ther,8707234,2014               
Am J Addict,9208821,2015                          
Am J Sports Med,7609541,2014                      

OCR itself took about 5 sec on an old Thinkpad laptop.

  • @TedTaylorofLife Version for MacOS exists, but it lacks many features of its Windows counterpart, including user's pattern learning and dictionary support. It also used to hang and freeze on Sierra and shows overall worse performance on macOS. If you've had another experience on macOS with FR, I'm really happy for you, but as long as it wasn't my case I decided not to claim it's fully functional on macOS. – andselisk Jul 8 '17 at 11:17
  • @TedTaylorofLife I explicitly told you that these are two different products, and from the look of it you used neither of them (except for the one outdated version from your Fujitsu scanner) to make a proper judgement. Also, I think you are on the wrong website. This is not a 4chan where people offence each other using capslock. You just got your comments flagged. – andselisk Jul 8 '17 at 13:40
  • If there is a version that runs on MacOS, then the statement that it runs on Windows only is false. If you want to clarify that the MacOS version is less capable, then say that. However you've bolded an incorrect statement. Relying on the comments to fix your answer isn't adequate. – Eric Shain Jul 8 '17 at 13:58
  • I added the relevant information regarding macOS and Linux support for both of you gentlemen. And there was no incorrect statement. I used a version that only exists on Windows platform. Hopefully this was educational for both of you. – andselisk Jul 8 '17 at 14:06
1

Method

I took your image that you posted and ran it threw my scansnap ix500 scanner. (Buy older scanner on craigslist for less than 200 bucks and get abyys software updates)

OS

Not Windows 10, but Windows 7

Software

Not free, but it has Abby Reader 5.0 which came with scanner Scansnap Abby Reader for Excel

Results

I hit the scan button and hit Abby scan to excel and it generated an .xls file, not a csv as requested. Abby Fine Reader Results Journal Abbreviation NlmlD Year Added to MTIFL AIDS Behav 9712133 2016 AIDS Care 8915313 2016 AIDS Educ Prev 9002873 2016 AIDS Patient Care STDS 9607225 2016 AJNR Am J Neuroradiol 8003708 2015 ASAIOJ 9204109 2016 Acad Emerg Med 9418450 2014 Acad Radiol 9440159 2016 Accid Anal Prev 1254476 2015 Acta Chir Iugosl 0372631 2015 Acta Clin Croat 9425483 2015 Acta Diabetol 9200299 2016 Acta Med Croatica 9208249 2015 Acta Med Iran 14540050R 2015 Acta Neurochir (Wien) 0151000 2014 Acta Neurol Scand 0370336 2015 Acta Odontol Scand 0370344 2015 Acta Psychol (Amst) 0370366 2013 Acta Trop 0370374 2015 Adv Ther 8611864 2015 Ageing Res Rev 101128963 2016 Aging Clin Exp Res 101132995 2015 Aliment Pharmacol Ther 8707234 2014 Am J Addict 9208821 2015 Am J Sports Med 7609541 2014

Alternatives

ABBYY FineReader Engine for Windows

ABBYY FineReader Engine for Windows

Pros 1. Works on Windows Cons 1. Not free 2. Setup, may not be trivial

ABBYY FineReader Engine for Windows

Alternative Number 2

Google Vision OCR API

Cons does not accept pdfs

Method

Save your image as a .png and tested it and got these results

OS

Will work on any os.

Ease of Use

Not trivial, but can get output to csv

Results

OCR API Results “ Journal Abbreviation [AIDS Behav [AIDS Care [AIDS Educ Prev [AIDS Patient Care STDS [AJNR Am J Neuroradiol [ASAIO J [Acad Emerg Med [Acad Radiol [Accid Prev [Acta Chir lugosl [Acta Clin Croat [Acta Diabetol [Acta Med Croatica [Acta Med Iran [Acta Neurochir (Wien) [Acta Neurol Scand [Acta Odontol Scand [Acta Psychol (Amst) [Acta Trop [Adv Ther [Ageing Res Rev i [Aging Clin Exp Res [Aliment Pharmacol Ther [Am J Addict [Am J Sports Med i i i NImlD 9712133 8915313 9002873 9607225 8003708 9204109 9418450 9440159 1254476 0372631 9425483 9200299 9208249 1454005OR 0151000 0370336 0370344 0370366 0370374 8611864 101128963 101132995 8707234 9208821 7609541 Year Added to MTIFL O 2016 O 2016 O 2016 O 2016 O 2015 O 2016 O 2014 2016 O 2015 O 2015 O 2015 O 2016 O 2015 O 2015 O 2014 2015 O 2015 O 2013 O 2015 O 2015 O 2016 O 2015 O 2014 2015 O 2014 O ”

  • I hope you are aware what CSV stands for. Because neither of your outputs contains CSV. And that copying other's answers is not a good move. – andselisk Jul 8 '17 at 11:23
  • When you link something, make sure you read through it. I am aware that format I posted are not standardized csvs. The guy is getting his phd from MIT, I am pretty sure he can figure it out. Plus the Vision API returns output in json file or csv. Posting CSV on SE is not that easy. Just an fyi from the link you posted. "The CSV file format is not standardized. The basic idea of separating fields with a comma is clear, but that idea gets complicated when the field data may also contain commas or even embedded line-breaks." – Ted Taylor of Life Jul 8 '17 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.