Method GetTextData
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
GetTextData()
Gets all text drawn on the canvas as the collection of the PdfTextData objects.
public PdfCollection<PdfTextData> GetTextData()
Returns
- PdfCollection<PdfTextData>
All text drawn on the canvas as the collection of the PdfTextData objects.
Remarks
You can check the following conditions to detect whether an extracted text chunk is visible on the page:
- Layer should be absent or visible.
- RenderingMode should not be equal to NeitherFillNorStroke or AddToPath.
- Bounds should fit into the corresponding ClipRegion. You can use IsVisible(PdfRectangle) method for this check.
- If you know the background color of the page, then you may check that the text color is different. You can use Brush and/or Pen properties depending on the RenderingMode.
Read the Extract detailed text information for an example of using the text data collection.