0

I have a PDF file containing thousands of entries like userId,userName etc. Is there any way to insert these into a MySQL database?

jotik
  • 17,044
  • 13
  • 58
  • 123

2 Answers2

1

You Actually can not import data from a PDF file

An work around is to convert the file to an excel and importing from it

  1. To convert pdf to excel

https://www.freepdfconvert.com/pdf-excel

  1. To Import data from excel to Database

How to import an excel file in to a MySQL database

Community
  • 1
  • 1
Andrews B Anthony
  • 1,381
  • 9
  • 27
0

If it's a one-off file you can copy and paste the contents into excel, save as CSV and import into you mysql table.

You can also parse it, there's plenty of libraries to convert pdf data into text, which such text can be then further parsed and inserted into your table.

If you need to do it in mass, then I suggest get a mass converter like this pdf to mysql indexer, then parse the indexed data into structured content.

Oliver M Grech
  • 3,071
  • 1
  • 21
  • 36