線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1962
推到 Plurk!
推到 Facebook!

怎样得到印表机打印的内容?

 
tonny2003
一般會員


發表:5
回覆:2
積分:1
註冊:2005-09-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2006-11-09 08:27:59 IP:218.18.xxx.xxx 未訂閱
请问,怎样可以将打印机打印出来的内容记录到一个档案中?
bbawei
一般會員


發表:0
回覆:2
積分:0
註冊:2006-11-24

發送簡訊給我
#2 引用回覆 回覆 發表時間:2006-11-25 17:42:52 IP:61.229.xxx.xxx 未訂閱
記得大多數的印表機都有列印到檔案的功能,你可以在列印設定或印表機設定中找找。
susu
一般會員


發表:0
回覆:6
積分:11
註冊:2004-07-19

發送簡訊給我
#3 引用回覆 回覆 發表時間:2006-12-18 09:28:20 IP:60.209.xxx.xxx 未訂閱
type
TPrinterInfo = record
SeverName : PChar;
PrinterName : PChar;
ShareName : PChar;
PortName : PChar;
DriverName : PChar;
Comment : PChar;
Location : PChar;
DeviceMode : PDeviceModeA;
SepFile : PChar;
PrintProcessor : PChar;
DataType : PChar;
Parameters : PChar;
SecurityDescriptor: PSecurityDescriptor;
Attributes : Cardinal;
DefaultPriority : Cardinal;
StartTime : Cardinal;
UntilTime : Cardinal;
Status : Cardinal;
Jobs : Cardinal;
AveragePPM : Cardinal;
end;
function GetCurrentPrinterInformation: TPrinterInfo;
var
hPrinter : THandle;
pInfo: PPrinterInfo2;
bytesNeeded: DWORD;
begin
hprinter := GetCurrentPrinterHandle;
try
Winspool.GetPrinter( hPrinter, 2, Nil, 0, @bytesNeeded );
pInfo := AllocMem( bytesNeeded );
try
Winspool.GetPrinter( hPrinter, 2, pInfo, bytesNeeded, @bytesNeeded );
Result.SeverName := pInfo^.pServerName;
Result.PrinterName := pInfo^.pPrinterName;
Result.ShareName := pInfo^.pShareName;
Result.PortName := pInfo^.pPortName;
Result.DriverName := pInfo^.pDriverName;
Result.Comment := pInfo^.pComment;
Result.Location := pInfo^.pLocation;
Result.DeviceMode := pInfo^.pDevMode;
Result.SepFile := pInfo^.pSepFile;
Result.PrintProcessor := pInfo^.pPrintProcessor;
Result.DataType := pInfo^.pDatatype;
Result.Parameters := pInfo^.pParameters;
Result.SecurityDescriptor := pInfo^.pSecurityDescriptor;
Result.Attributes := pInfo^.Attributes;
Result.DefaultPriority := pInfo^.DefaultPriority;
Result.StartTime := pInfo^.StartTime;
Result.UntilTime := pInfo^.UntilTime;
Result.Status := pInfo^.Status;
Result.Jobs := pInfo^.cJobs;
Result.AveragePPM := pInfo^.AveragePPM;
finally
FreeMem( pInfo );
end;
finally
ClosePrinter( hPrinter );
end;
end;


系統時間:2024-04-23 15:40:58
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!