• How to read PDF file using iTextSharp in ASP.NET

    by  • May 9, 2014 • Microsoft .NET C# (C-Sharp), Microsoft ASP.NET, Microsoft VB.NET • 0 Comments

    iTextSharp is an open source library for creating and manipulating PDF files in ASP.NET. It makes us really easy for us to to create and manipulate PDF files in ASP.NET code using iTextSharp library. Although many other open source libraries and APIs available for PDF files but I am a good admirer of ITextSharp. I will write a series of articles on PDF and iTextSharp and I will show you that how we can play with PDF files using iTextSharp. This article will be the first of this series and here I will show you to read PDF file using iTextSharp both in C# and VB.NET.

    • First you need to download iTextSharp, extract it and include it in your project.
    • Create a website in Visual Studio for C# or VB.NET and add a web form to it.
    • Add a reference of ITextSharp in your website.
    • Add following controls in Web Form for this sample. You need to have a PDF in your drive to upload in your sample website.

    • Add following namespaces

    C#

    VB.NET

    • Write below code Button click event

    C#

    VB.NET

    • View in browser, upload PDF file and click button to see text of PDF file which we read using iTextSharp.
    • You can download complete code sample from below link.
    Download Sample Code2757 downloads

     




    Namecheap.com
    Avatar of GetCodeSnippet.com

    About

    GetCodeSnippet.com provides you high quality Microsoft .NET development related articles, tutorials and sample code for ASP.NET, C#, VB.NET, AJAX, WCF, WPF, Web Services, Windows Services, SQL Server and other technologies.

    Leave a Reply