using System;
using System.IO;
using XP.Common.PdfViewer.Exceptions;
namespace XP.Common.PdfViewer.Interfaces
{
///
/// PDF 打印服务接口 | PDF print service interface
/// 提供 PDF 文件打印功能 | Provides PDF file printing functionality
///
public interface IPdfPrintService
{
///
/// 使用指定打印机打印 PDF 文件 | Print PDF file with specified printer
///
/// PDF 文件路径 | PDF file path
/// 打印机名称 | Printer name
/// 起始页码(从 1 开始,null 表示从第一页)| Start page (1-based, null for first page)
/// 结束页码(从 1 开始,null 表示到最后一页)| End page (1-based, null for last page)
/// 打印份数(默认 1)| Number of copies (default 1)
/// 文件不存在 | File not found
/// PDF 格式无效 | Invalid PDF format
/// 打印机不存在 | Printer not found
/// 打印失败 | Print failed
void Print(string filePath, string printerName, int? pageFrom = null, int? pageTo = null, int copies = 1);
///
/// 打开打印设置对话框并打印 | Open print settings dialog and print
///
/// PDF 文件路径 | PDF file path
/// 用户是否确认打印 | Whether user confirmed printing
bool PrintWithDialog(string filePath);
///
/// 打开打印预览对话框 | Open print preview dialog
///
/// PDF 文件路径 | PDF file path
void PrintPreview(string filePath);
}
}