mike chathuranga
mike chathuranga

Reputation: 11

how to convert a pdf with the format to xls in C#?

I want to convert this pdf page this is the pdf screenshot to .xls file along with the columns.

Upvotes: 1

Views: 171

Answers (1)

Kurt
Kurt

Reputation: 4517

You should be able to use a PDF parsing library to extract the text. This could be very easy to impossible. It depends on how the table is represented internally. If it is represented as an image you will also need an OCR library. In the easiest case you could just extract all the text as a string and split rows according to newlines and columns according to tabs or other whitespace.

Try this one and see what happens: http://www.squarepdf.net/parsing-pdf-files-using-itextsharp

Edit: I focused on the reading the PDF part. The writing to Excel is more than covered with a quick google search.

Upvotes: 1

Related Questions