HTML JPG PDF XML DOCX
  Product Family
PDF

Parse PDF for extraction Text by name in .NET SDK

API for parsing PDF documents to extraction text by name using server-side .NET API.

Get Started

How to parse PDF documents for extraction Text by name using Cloud .NET SDK

For parse PDF documents to extraction Text by name via Cloud .NET SDK , we’ll use Aspose.PDF Cloud .NET SDK This Cloud .NET 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 parse PDF to extaction Text by name using .NET SDK

Aspose.PDF Cloud developers can easily parse PDF documents for extraction Text by name. Developers need just a few lines of code.

  1. Create a new Configuration object with your Application Secret and Key
  2. Create an object to connect to the Cloud API
  3. Upload your document file
  4. Parse PDF documents for extraction Text by name in cloud storage using GetTextBoxFieldAsync function
  5. Checks the response and logs the result
  6. If the operation was successful, print the etracted text
 

This sample code shows parsing PDF document for extraction Text by name


    using Aspose.Pdf.Cloud.Sdk.Model;

    namespace Parser
    {
        public class GetTextBox
        {
            public static async Task Extract(string documentName, string fieldName, string remoteFolder)
            {
		// Get your AppSid and AppSecret from https://dashboard.aspose.cloud (free registration required). 
		pdfApi = new PdfApi(AppSecret, AppSid);

                using (var file = File.OpenRead(Path.Combine(localFolder, documentName)))
		{ // Upload the local PDF to cloud storage folder name.
                    FilesUploadResult uploadResponse = await pdfApi.UploadFileAsync(Path.Combine(remoteFolder, documentName), documentName);
                    Console.WriteLine(uploadResponse.Uploaded[0]);
                }

                // Parse PDF to extract text box by name in cloud storage.
                TextBoxFieldResponse response = await pdfApi.GetTextBoxFieldAsync(documentName, fieldName, folder: remoteFolder);

                // Checks the response and logs the result.
                if (response == null)
                    Console.WriteLine("GetTextBox(): Unexpected error!");
                else if (response.Code < 200 || response.Code > 299)
                    Console.WriteLine("GetTextBox():  Failed to receive TextBox fields from the document.");
                else
                { // Show text box.
                    Console.WriteLine("GetTextBox(): TextBox field '{0}' successfully received from the document '{1}.", fieldName, documentName);
                    Console.WriteLine(response.Field.ToString());
                }
            }
        }
    }
 

Work with the Text parsing in PDF via .NET SDK

By parsing PDF documents for text extraction by name, you can modify the content of TextBox field as needed. This maintains the position of the text in the documents while saving time and reducing manual work. Parse PDF documents to extraction text by name with Aspose.PDF Cloud .NET SDK.

With our .NET SDK you can

  • Add PDF document’s header & footer in text or image format.
  • Add tables & text or image stamps to PDF documents.
  • Append multiple PDF documents to an existing file.
  • Work with PDF attachments, annotations, & form fields.
  • Apply encryption or decryption to PDF documents & set a password.
  • Delete all stamps & tables from a page or entire PDF document.
  • Delete a specific stamp or table from the PDF document by its ID.
  • Replace single or multiple instances of text on a PDF page or from the entire document.
  • Extensive support for converting PDF documents to various other file formats.
  • Extract various elements of PDF files & make PDF documents optimized.
  • You can try out our free App to test the functionality.

  •