using HtmlToPdfService.Core.Models;
using PuppeteerSharp;
namespace HtmlToPdfService.Core.Services;
///
/// 图片转换服务接口
///
public interface IImageService
{
///
/// 将 HTML 内容转换为图片
///
Task ConvertHtmlToImageAsync(
string html,
ScreenshotOptions? options = null,
int? viewportWidth = null,
int? viewportHeight = null,
int? delayAfterLoad = null,
string? callbackUrl = null,
Dictionary? callbackHeaders = null,
bool? includePdfInCallback = null,
bool? saveLocal = null,
CancellationToken cancellationToken = default);
///
/// 将 URL 转换为图片
///
Task ConvertUrlToImageAsync(
string url,
ScreenshotOptions? options = null,
int? viewportWidth = null,
int? viewportHeight = null,
WaitUntilNavigation[]? waitUntil = null,
int? timeout = null,
int? delayAfterLoad = null,
string? callbackUrl = null,
Dictionary? callbackHeaders = null,
bool? includePdfInCallback = null,
bool? saveLocal = null,
CancellationToken cancellationToken = default);
}