PrintPagesA

渲染和打印

描述

末尾的 A 表示 ANSI(char)DLL 入口点;ActiveX/COM 接口仅公开 Unicode 形式。其行为与 PrintPages 相同,字符串参数按当前 SetAnsiMode 代码页解释

将选定文档中的页面范围列表渲染到指定打印机

语法

Delphi

Function DLPrintPagesA(InstanceID: Integer; PrinterName, PageRanges: PAnsiChar; Options: Integer): Integer;

DLL

int DLPrintPagesA(int InstanceID, const char * PrinterName, const char * PageRanges, int Options);

参数

PrinterName用于打印的打印机名称。这是 Windows 打印管理器中显示的名称。使用 GetPrinterNames 函数可返回系统中有效打印机的列表。此处还可使用 NewCustomPrinter 函数返回的值
PageRanges要打印的页面列表,例如 "1-10,12,14"
Options使用 PrintOptions 函数获取此参数的值

返回值

0发生错误
1页面已成功打印