Method HasImageOnPage
HasImageOnPage(int, CancellationToken)
Determines whether the specified page contains image content.
public bool HasImageOnPage(int pageIndex, CancellationToken cancellationToken = default)
Parameters
pageIndexintZero-based index of the page to check.
cancellationTokenCancellationTokenA token to monitor for cancellation requests. Default: None.
Returns
- bool
trueif the specified page exposes at least one image; otherwise,false.
Remarks
Image attachments always return true because the page itself is an image.
Paginated document formats (PDF, DOCX, PPTX, XLSX, EML, MBOX) delegate to the underlying
format-specific image detection. Text-only formats (plain text, HTML) always return false.
For attachments without page semantics, use pageIndex 0.
- See Also