Ejemplo n.º 1
0
        internal PdfTextInfo(PdfText textPage, int index, int count)
        {
            Text = PDFium.FPDFText_GetText(textPage.Handle, index, count);
            int num = PDFium.FPDFText_CountRects(textPage.Handle, index, count);

            Rects = new ReadOnlyList <FS_RECTF>();
            for (int i = 0; i < num; i++)
            {
                PDFium.FPDFText_GetRect(textPage.Handle, i, out double left, out double top, out double right, out double bottom);
                Rects.Add(new FS_RECTF((float)left, (float)top, (float)right, (float)bottom));
            }
        }
Ejemplo n.º 2
0
 public string GetText(int start_index, int count) => PDFium.FPDFText_GetText(Handle, start_index, count);
Ejemplo n.º 3
0
 /// <summary>
 /// Extracts text from the page.
 /// </summary>
 /// <param name="index">Index for the start characters.</param>
 /// <param name="count">Number of characters to be extracted.</param>
 /// <returns></returns>
 public string GetText(int index, int count)
 {
     return(PDFium.FPDFText_GetText(Handle, index, count));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Returns all the text on the page.
 /// </summary>
 /// <returns></returns>
 public string GetText() => PDFium.FPDFText_GetText(Handle, 0, CountChars());