Creating a Wrapper Assembly

Aspose.PDF for .NET Wrapper

using System;
using System.Runtime.InteropServices;
namespace PdfText
    public interface IPetriever
        void SetLicense(string file);

        string GetText(string file);



    public class Petriever : IPetriever
        public void SetLicense(string file)
            License lic = new License();

        public string GetText(string file)
            // open document
            Document doc = new Document(file);

            // create TextAbsorber object to extract text
            TextAbsorber absorber = new TextAbsorber();

            // accept the absorber for all document's pages

            // get the extracted text

            string text = absorber.Text;
            return text;