Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

Itextsharp c#

I am 10 pages pdf that each page contain a text called esign
How can I use itextsharp to find the esign position?

Thanks
Avatar of ITsolutionWizard
ITsolutionWizard
Flag of United States of America image

ASKER

Help?
Avatar of Chinmay Patel
using (PdfReader reader = new PdfReader(pdfFile.FullName))
                        {
                            using (PdfDocument document = new PdfDocument(reader))
                            {
                                for (int i = 0; i < document.GetNumberOfPages(); i++)
                                {
                                    ITextExtractionStrategy strategy = new SimpleTextExtractionStrategy();
                                    PdfPage page = document.GetPage(i + 1);

                                    string pageContent = PdfTextExtractor.GetTextFromPage(page);

}
}
}
}

Open in new window


then process pageContent.

Regads,
Chinmay.
Should return list of x n y
It should return x and y in pair and if the pdf has 10 signature position, it should return in list
That is something you will have to derive by processing pageContent string variable. Also PDF is handled in a very different way (if you analyze the value of pageContent you will realize that) so be prepared for surprises.
Please show me in codes
ASKER CERTIFIED SOLUTION
Avatar of Chinmay Patel
Chinmay Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Author has not reverted back. The code provided does what author has asked for.