Beispiel #1
0
        static public List <CharBox> GetCharBoxsFromPage(PdfReader pdfReader, int pageI, bool removeDuplicates)
        {
            Rectangle r = pdfReader.GetPageSize(pageI);
            CharBoxExtractionStrategy s = new CharBoxExtractionStrategy(new System.Drawing.RectangleF(r.Left, r.Bottom, r.Width, r.Height));

            PdfTextExtractor.GetTextFromPage(pdfReader, pageI, s);
            if (removeDuplicates)
            {
                s.CharBoxs = RemoveDuplicates(s.CharBoxs);
            }
            return(s.CharBoxs);
        }
Beispiel #2
0
        static public List <CharBox> GetCharBoxsFromPage(PdfDocument pdfDocument, int pageI, bool removeDuplicates)
        {
            PdfPage   p = pdfDocument.GetPage(pageI);
            Rectangle r = p.GetPageSize();
            CharBoxExtractionStrategy s = new CharBoxExtractionStrategy(new System.Drawing.RectangleF(r.GetX(), r.GetY(), r.GetWidth(), r.GetHeight()));

            PdfTextExtractor.GetTextFromPage(p, s);
            if (removeDuplicates)
            {
                s.CharBoxs = RemoveDuplicates(s.CharBoxs);
            }
            return(s.CharBoxs);
        }