API Reference
PdfPageInteractionMap
Dependency-free text-selection and hit-test projection for one rendered PDF page. Coordinates use the visual page's top-left origin after CropBox and page rotation are applied.
Inheritance
- Object
- PdfPageInteractionMap
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
Methods
public static PdfPageInteractionMap Create(Byte[] pdf, Int32 pageNumber, PdfPageInteractionOptions options = null, PdfReadOptions readOptions = null) #PdfPageInteractionMapBuilds an interaction map from PDF bytes.
Parameters
- pdf System.Byte[]
- pageNumber System.Int32
- options OfficeIMO.Pdf.PdfPageInteractionOptions = null
- readOptions OfficeIMO.Pdf.PdfReadOptions = null
public String GetSelectedText(Double x1, Double y1, Double x2, Double y2) #StringConcatenates selected text elements in extraction order.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
public IReadOnlyList<PdfPageInteractionRegion> HitTest(Double x, Double y, Double tolerance = 0) #IReadOnlyList<PdfPageInteractionRegion>Returns all regions containing a visual top-left page coordinate.
Parameters
- x System.Double
- y System.Double
- tolerance System.Double = 0
public IReadOnlyList<PdfPageInteractionRegion> SelectText(Double x1, Double y1, Double x2, Double y2) #IReadOnlyList<PdfPageInteractionRegion>Returns text elements whose quads intersect a visual top-left selection rectangle.
Parameters
- x1 System.Double
- y1 System.Double
- x2 System.Double
- y2 System.Double
Inherited Methods
Properties
public Int32 PageNumber { get; } #One-based page number.
public Double Width { get; } #Visual page width in PDF points after page rotation.
public Double Height { get; } #Visual page height in PDF points after page rotation.
public IReadOnlyList<PdfPageInteractionRegion> Regions { get; } #All text, link, annotation, and form-widget regions.
public IReadOnlyList<PdfPageInteractionRegion> TextRegions { get; } #Text-element regions in content extraction order.