private string GetPdfText(PageData pageData, PdfTextSpan textSpan) { var result = new byte[(textSpan.Length + 1) * 2]; NativeMethods.FPDFText_GetText(pageData.TextPage, textSpan.Offset, textSpan.Length, result); return(FPDFEncoding.GetString(result, 0, textSpan.Length * 2)); }
public string GetPdfText(PdfTextSpan textSpan) { using (var pageData = new PageData(_document, _form, textSpan.Page)) { return(GetPdfText(pageData, textSpan)); } }
public IList <PdfRectangle> GetTextBounds(PdfTextSpan textSpan) { using (var pageData = new PageData(_document, _form, textSpan.Page)) { return(GetTextBounds(pageData.TextPage, textSpan.Page, textSpan.Offset, textSpan.Length)); } }
public IList <PdfRectangle> GetTextBounds(PdfTextSpan textSpan) { var result = new List <PdfRectangle>(); foreach (var rectangle in _document.GetTextBounds(textSpan)) { result.Add(new PdfRectangle( rectangle.Page + _startPage, rectangle.Bounds )); } return(result); }
public bool GetWordAtPosition(PdfPoint location, double xTolerance, double yTolerance, out PdfTextSpan span) { return(_document.GetWordAtPosition(location, xTolerance, yTolerance, out span)); }
public string GetPdfText(PdfTextSpan textSpan) { return(_document.GetPdfText(textSpan)); }
/// <summary> /// Get all bounding rectangles for the text span. /// </summary> /// <description> /// The algorithm used to get the bounding rectangles tries to join /// adjacent character bounds into larger rectangles. /// </description> /// <param name="textSpan">The span to get the bounding rectangles for.</param> /// <returns>The bounding rectangles.</returns> public IList<PdfRectangle> GetTextBounds(PdfTextSpan textSpan) { return _file.GetTextBounds(textSpan); }
/// <summary> /// Get all text matching the text span. /// </summary> /// <param name="textSpan">The span to get the text for.</param> /// <returns>The text matching the span.</returns> public string GetPdfText(PdfTextSpan textSpan) { return _file.GetPdfText(textSpan); }
public IList <PdfRectangle> GetTextBounds(PdfTextSpan textSpan) { throw new NotImplementedException(); }
public string GetPdfText(PdfTextSpan textSpan) { throw new NotImplementedException(); }
public PdfMatch(string text, PdfTextSpan textSpan, int page) { Text = text; TextSpan = textSpan; Page = page; }