Beispiel #1
0
        string ReadTextFromRect(int pageNum, Rect bbox)
        {
            PageTextExtractor pageProcess = null;

            if (!_pageProcessCache.TryGetValue(pageNum, out pageProcess))
            {
                pageProcess = new PageTextExtractor(_pdfDoc.GetPage(pageNum));

                _pageProcessCache.Add(pageNum, pageProcess);
            }

            return(pageProcess.SearchText(bbox));
        }
Beispiel #2
0
        public double[] GetLeftRightTextBounds(int pageNum)
        {
            PageTextExtractor pageProcess = null;

            if (!_pageProcessCache.TryGetValue(pageNum, out pageProcess))
            {
                pageProcess = new PageTextExtractor(_pdfDoc.GetPage(pageNum));

                _pageProcessCache.Add(pageNum, pageProcess);
            }

            return(pageProcess.LeftRightBounds);
        }