Reading PDF File (ItextSharp) in CSharp

Reading PDF File – I started my day searching a solution on how to read PDF  file and finally I was able to search for a solution . Here is a solution from stack overflow.
I am posting this to be able to help readers from this blog who have also searching for this problem.

Credit to stackoverflow:


Here’s a code found on this link which helps me a lot.

If you are using Visual Studio , you can add reference to ItextSharp using Manage Nuget Packages.To open Manage Nuget Packages, go to your solution explorer and right-click on your project name then scroll down for Manager Nuget Packages. To search for ItextSharp, simply search for ItextSharp then if the search result appears select the first option and click the  install button on the right side of the result.

Below is the image of ItextSharp from Manage Nuget Packages option. Reading PDF File

After successfully adding this reference you can now use it by adding this reference from your code.

  • using iTextSharp.text.pdf;
  • using iTextSharp.text.pdf.parser;

And now, you can already use iTextSharp from your code.

Thank you for reading!

Hopes that this simple solution can help you.

Happy coding!!

Leave a Reply

Your email address will not be published. Required fields are marked *