Table of Contents

Method HasImageOnPageAsync

Namespace
LMKit.Data
Assembly
LM-Kit.NET.dll

HasImageOnPageAsync(int, CancellationToken)

Asynchronously determines whether the specified page contains image content.

public Task<bool> HasImageOnPageAsync(int pageIndex, CancellationToken cancellationToken = default)

Parameters

pageIndex int

Zero-based index of the page to check.

cancellationToken CancellationToken

A token to monitor for cancellation requests. Default: None.

Returns

Task<bool>

A task whose result is true if 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
Share