using System;
using System.IO;
using XP.Common.PdfViewer.Exceptions;
namespace XP.Common.PdfViewer.Interfaces
{
///
/// PDF 查看服务接口 | PDF viewer service interface
/// 提供 PDF 文件加载和阅读器窗口管理功能 | Provides PDF file loading and viewer window management
///
public interface IPdfViewerService : IDisposable
{
///
/// 通过文件路径打开 PDF 阅读器窗口 | Open PDF viewer window by file path
///
/// PDF 文件路径 | PDF file path
/// 文件不存在 | File not found
/// PDF 格式无效 | Invalid PDF format
void OpenViewer(string filePath);
///
/// 通过文件流打开 PDF 阅读器窗口 | Open PDF viewer window by stream
///
/// PDF 文件流 | PDF file stream
/// 窗口标题(可选)| Window title (optional)
/// 流为 null | Stream is null
/// PDF 格式无效 | Invalid PDF format
void OpenViewer(Stream stream, string? title = null);
}
}