HTML JPG PDF XML DOCX
  Product Family
PDF

Extract Text from PDF via .NET SDK

Get Text from PDF Documents using server-side .NET API

Get Started

How to remove text from PDF document via Cloud .NET SDK

In order to extract text from PDF document via Cloud .NET SDK , we’ll use Aspose.PDF Cloud .NET SDK This Cloud SDK allows you to easily build cloud-based PDF creator, editor & converter apps in C#, ASP.NET, or other .NET languages for various cloud platforms. Open NuGet package manager, search for Aspose.PDF Cloud and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command


    PM> Install-Package Aspose.Pdf-Cloud

Steps to get text from PDF document via .NET SDK

Aspose.PDF Cloud developers can easily load & extract text from PDF in just a few lines of code.

  1. Upload the File to Cloud Storage
  2. Initializes the PdfApi with the provided credentials (Application ID and Application Key).
  3. Reads the local PDF file and uploads it to the Aspose Cloud storage.
  4. Call API to Extract text from PDF.
  5. Show extracted text from PDF.
 

This sample code shows deleting text from PDF documents


    public static async Task Extract()
    {
        const string localImageFileName = @"C:\Samples\sample.pdf";
        const string storageFileName = "sample.pdf";
        const string storageTempFolder = "YourTempFolder";

        // Get your AppSid and AppSecret from https://dashboard.aspose.cloud (free registration required).
        //var pdfApi = new PdfApi(AppSecret, AppSid);

        using var file = File.OpenRead(localImageFileName);
        var uploadResult = await pdfApi.UploadFileAsync(storageFileName, file);
        Console.WriteLine(uploadResult.Uploaded[0]);

        var response = await pdfApi.GetTextAsync(storageFileName, LLX: 0, LLY: 0, URX: 0, URY: 0, folder: storageTempFolder);

        foreach (var item in response.TextOccurrences.List)
        {
            Console.WriteLine($"Page <{item.Page}> : {item.Text}");
        }
    }
 

Extract Text from PDF

Text can be dynamically extracted ifromn PDF document for a specific user. Text extracted can help maintain consistent information across different PDF versions, avoiding manual edits and ensuring that key information remains in place. Extract Text from PDF documents with Aspose.PDF Cloud .NET SDK.

With our .NET library you can:

  • Combine PDF documents.
  • Split PDF Files.
  • Convert PDF to other formats, and vice versa.
  • Manipulate Annotations.
  • Work with Images in PDF, etc.
  • You can try out our free App to replace text in PDF files online and test the functionality.