怎样打印机的纸张大小和打印方向?(100分)

  • 主题发起人 主题发起人 onlyonekgx
  • 开始时间 开始时间
O

onlyonekgx

Unregistered / Unconfirmed
GUEST, unregistred user!
例如:
打印机原来设置的纸张大小为 A4 纸,纵向打印,
我现在想把打印机设置成 A3 纸,横向打印.打印完毕后
再设置回原来的值,
请指教,谢谢!
 
如果是用FR报表控件的话,
fr.pages.Pages[0].ChangePaper(ASize, AWidth, AHeight,abin: Integer;
AOr: TPrinterOrientation);
//(256,3800,2800, 0,poPortrait);
asize:页码纸张的类型,可以通过api从打印驱动中取出例如,9是a4,如果系统没有的纸张类型,A3认为是自定义格式 利用 awidth,aheight,生成.AOr:打印方向
 
我的打印程序是自己写的,没有使用报表控件
 
uses WinSpool;
//================================
//nOrient 打印方向
//nHandle 打印机的Handle
// 调用 SetPaperSize(2000,3000,1,printer.handle);
// 调用后,修改系统的打印机的纸张大小的设置。
function TForm1.SetPaperSize(var nWidth,nHeight,nOrient:Word;var nHandle: THandle):integer;
var
// szPrinterKey: array[0..99] of Char;
szDeviceName: String;
szPort: String;
// cbBuffer: DWORD;
// dwRV: DWORD;
dwPapers: DWord;
lpwPapers: array[0..255] of Word;
fSupportUserDefind: Boolean;
fSupportA3: Boolean;
fSupportA4: Boolean;
fSupportB5: Boolean;
hDriver: THandle;
hMem: HGLOBAL;
lpDevMode: Pdevicemode;
a1: Pdevicemode;
i: integer;
begin
fSupportUserDefind:=FALSE;
fSupportA3:=FALSE;
fSupportA4:=FALSE;
fSupportB5:=FALSE;
//取当前默认打印机设备名
szDeviceName:=GetDeviceName();
if szDeviceName='' then
result:=-1;
//取打印机端口
szPort:=GetPortName();
if szPort='' then
result:=-2;
//取打印机支持的全部纸型
dwPapers:=DeviceCapabilities(PChar(szDeviceName),PChar(szPort),DC_PAPERS,@lpwPapers,nil);
if (dwPapers<1)or(dwPapers>256) then
result:=-3;
//判断打印机是否支持自定义、A3、A4、B5纸型
while (dwPapers > 0)do
begin
case DWORD(lpwPapers[dwPapers]) of
DMPAPER_USER: fSupportUserDefind:=TRUE;
DMPAPER_A3: fSupportA3:=TRUE;
DMPAPER_A4: fSupportA4:=TRUE;
DMPAPER_B5: fSupportB5:=TRUE;
end;
dwPapers:=dwPapers-1;
end;

//取打印机的DeviceMode
a1:=nil;
if not(OpenPrinter(PChar(szDeviceName),hDriver,nil)) then
result:=-4;
hMem:=GlobalAlloc(GPTR,DocumentPropertiesA(nHandle,hDriver,PChar(szDeviceName),a1^,a1^,0));
lpDevMode:=GlobalLock(hMem);
a1:=nil;
do
cumentProperties(nHandle,hDriver,PChar(szDeviceName),lpDevMode^,a1^,DM_OUT_BUFFER);
//设置纸型或大小
i:=0;
if ((nWidth=2970)and(nHeight=4200))and(fSupportA3) then
i:=1;
if ((nWidth=2100)and(nHeight=2970))and(fSupportA4) then
i:=i+2;
if ((nWidth=1820)and(nHeight=2570))and(fSupportB5) then
i:=i+3;
case i of
1: begin
//A3
lpDevMode.dmFields:=DM_PAPERSIZE;
lpDevMode.dmPaperSize:=DMPAPER_A3;
end;
2: begin
//A4
lpDevMode.dmFields:=DM_PAPERSIZE;
lpDevMode.dmPaperSize:=DMPAPER_A4;
end;
3: begin
//B5
lpDevMode.dmFields:=DM_PAPERSIZE;
lpDevMode.dmPaperSize:=DMPAPER_B5;
end;
else
if fSupportUserDefind then
begin
lpDevMode.dmFields:=DM_PAPERSIZE or DM_PAPERWIDTH or DM_PAPERLENGTH;
lpDevMode.dmPaperSize:=DMPAPER_USER;
lpDevMode.dmPaperWidth:=nWidth;
lpDevMode.dmPaperLength:=nHeight;
end
else
lpDevMode.dmFields:=0;
end;

//设置方向
case nOrient of
0: begin
lpDevMode.dmFields:=lpDevMode.dmFields or DM_ORIENTATION;
lpDevMode.dmOrientation:=DMORIENT_PORTRAIT;
end;
1: begin
lpDevMode.dmFields:=lpDevMode.dmFields or DM_ORIENTATION;
lpDevMode.dmOrientation:=DMORIENT_LANDSCAPE;
end;
end;

a1:=nil;
do
cumentProperties(nHandle,hDriver,PChar(szDeviceName),a1^,lpDevMode^,DM_IN_BUFFER or DM_UPDATE);
GlobalUnlock(hMem);
GlobalFree(hMem);
ClosePrinter(hDriver);
result:=1;
end;
 
在执行打印前调用以下函数:
procedure SetPaperSize(X, Y: Integer);
// 单位是0.1mm
// A4时 Printer.Pagewidth:=1440; A5时 Printer.Pagewidth:=1049;
// B5时 Printer.Pagewidth:=1290; 16K时 Printer.Pagewidth:=1035;
// lq1600宽行打印机这个值宽度最大为42cm左右, 长度大约2m。
//改变devicemode结构
var
Device: array[0..255] of char;
Driver: array[0..255] of char;
Port: array[0..255] of char;
hDMode: THandle;
PDMode: PDEVMODE;
begin
Printer.PrinterIndex := Printer.PrinterIndex;
Printer.GetPrinter(Device, Driver, Port, hDMode);
if hDMode <> 0 then
begin
pDMode := GlobalLock(hDMode);
if pDMode <> nil then
begin
if (x = 0) or (y = 0) then
begin
{Set to legal}
pDMode^.dmFields := pDMode^.dmFields or dm_PaperSize;
{pDMode^.dmPaperSize := DMPAPER_LEGAL;
changed by wulianmin}
pDMode^.dmPaperSize := DMPAPER_FANFOLD_US;
end
else
begin
{Set to custom size}
pDMode^.dmFields := pDMode^.dmFields or
DM_PAPERSIZE or
DM_PAPERWIDTH or
DM_PAPERLENGTH;
pDMode^.dmPaperSize := DMPAPER_USER;
pDMode^.dmPaperWidth := x {SomeValueInTenthsOfAMillimeter};
pDMode^.dmPaperLength := y {SomeValueInTenthsOfAMillimeter};
end;
{设定纸张来源}
pDMode^.dmFields := pDMode^.dmFields or DMBIN_MANUAL;
pDMode^.dmDefaultSource := DMBIN_MANUAL;
GlobalUnlock(hDMode);
end;
end;
Printer.PrinterIndex := Printer.PrinterIndex;
//以下开始打印
Printer.begin
Doc;
Printer.Canvas.TextOut(100,100, 'Test 1');
Printer.EndDoc;
end;

这个你看看???
 
最好用报表控件
 
關注!頂一下
 
在操作系统中设置吧。
 
我在网上找了一下:
unit EDSPrint;
{unit to programmatically set printer options so that userdo
es not}
{have to go to the Printer Options Dialog Box}
{Revision 1.5}
interface
uses
Classes, Forms, Printers, SysUtils, WinSpool,WinProcs, WinTypes, Messages;
{see the WinTypes unit for constant declarations such as}
{dmPaper_Letter, dmbin_Upper, etc}
const
CCHBinName = 24;
{Size of bin name (should have been in PRINT.PAS}
CBinMax = 256;
{Maximum number of bin sources}
CPaperNames = 256;
{Maximum number of paper sizes}
type
TPrintSet = class (TComponent)
private
{ Private declarations }
FDevice: PChar;
FDriver: PChar;
FPort: PChar;
FHandle: THandle;
FDeviceMode: PDevMode;
protected
{ Protected declarations }
procedure SetOrientation (Orientation: integer);
function GetOrientation: integer;
{-sets/gets the paper orientation}
procedure SetPaperSize (Size: integer);
function GetPaperSize: integer;
{-sets/gets the paper size}
procedure SetPaperLength (Length: integer);
function GetPaperLength: integer;
{-sets/gets the paper length}
procedure SetPaperWidth (Width: integer);
function GetPaperWidth: integer;
{-sets/gets the paper width}
procedure SetScale (Scale: integer);
function GetScale: integer;
{-sets/gets the printer scale (whatever that is)}
procedure SetCopies (Copies: integer);
function GetCopies: integer;
{-sets/gets the number of copies}
procedure SetBin (Bin: integer);
function GetBin: integer;
{-sets/gets the paper bin}
procedure SetPrintQuality (Quality: integer);
function GetPrintQuality: integer;
{-sets/gets the print quality}
procedure SetColor (Color: integer);
function GetColor: integer;
{-sets/gets the color (monochrome or color)}
procedure SetDuplex (Duplex: integer);
function GetDuplex: integer;
{-sets/gets the duplex setting}
procedure SetYResolution (YRes: integer);
function GetYResolution: integer;
{-sets/gets the y-resolution of the printer}
procedure SetTTOption (Option: integer);
function GetTTOption: integer;
{-sets/gets the TrueType option}
public
{ Public declarations }
constructor Create (AOwner: TComponent);
override;
{-initializes object}
destructor Destroy;
override;
{-destroys class}
function GetBinSourceList: TStringList;
{-returns the current list of bins}
function GetPaperList: TStringList;
{-returns the current list of paper sizes}
procedure SetDeviceMode;
{-updates the printers TDevMode structure}
procedure SaveToDefaults;
{-updates the default settings for the current printer}
{ Property declarations }
property Orientation: integer read GetOrientation
write SetOrientation;
property PaperSize: integer read GetPaperSize
write SetPaperSize;
property PaperLength: integer read GetPaperLength
write SetPaperLength;
property PaperWidth: integer read GetPaperWidth
write SetPaperWidth;
property Scale: integer read GetScale
write SetScale;
property Copies: integer read GetCopies
write SetCopies;
property DefaultSource: integer read GetBin
write SetBin;
property PrintQuality: integer read GetPrintQuality
write SetPrintQuality;
property Color: integer read GetColor
write SetColor;
property Duplex: integer read GetDuplex
write SetDuplex;
property YResolution: integer read GetYResolution
write SetYResolution;
property TTOption: integer read GetTTOption
write SetTTOption;
end;
{ TPrintSet }
procedure Register;
{-registers the printset component}
implementation
constructor TPrintSet.Create (AOwner: TComponent);
{-initializes object}
begin

inherited Create (AOwner);
if not (csDesigning in ComponentState) then

begin

GetMem (FDevice, 255);
GetMem (FDriver, 255);
GetMem (FPort, 255);
Printer.GetPrinter (FDevice, FDriver, FPort, FHandle);
if FHandle = 0 then

begin
{driver not loaded}
Printer.PrinterIndex := Printer.PrinterIndex;
{-forces Printer object to load driver}
end;
{ if... }
Printer.GetPrinter (FDevice, FDriver, FPort, FHandle);
if FHandle<>0 then

begin

FDeviceMode := GlobalLock( FHandle);
{-PDeviceMode now points to Printer.DeviceMode}
FDeviceMode^.dmFields := 0;
end {:} else

begin

FDeviceMode := nil;
Raise EPrinter.Create ('Error retrieving DeviceMode');
end;
{ if... }
end {:} else

begin

FDevice := nil;
FDriver := nil;
FPort := nil;
end;
{ if... }
end;
{ TPrintSet.Create }
function TPrintSet.GetBinSourceList: TStringList;
{-returns the current list of bins (returns nil for none)}
type
TcchBinName = array[0..CCHBinName-1] of Char;
TBinArray = array[1..cBinMax] of TcchBinName;
PBinArray = ^TBinArray;
var
NumBinsReq: Longint;
{number of bins required}
NumBinsRec: Longint;
{number of bins received}
BinArray: PBinArray;
BinList: TStringList;
BinStr: String;
i: Longint;
DevCaps: TFarProc;
DrvHandle: THandle;
DriverName: String;
begin

Result := nil;
BinArray := nil;
try
DrvHandle := LoadLibrary (FDriver);
if DrvHandle <> 0 then

begin

DevCaps := GetProcAddress (DrvHandle, 'DeviceCapabilities');
if DevCaps<>nil then

begin

NumBinsReq := WinSpool.DeviceCapabilities (FDevice, FPort, DC_BinNames,
nil, FDeviceMode^);
GetMem (BinArray, NumBinsReq * SizeOf (TcchBinName));
NumBinsRec := DeviceCapabilities (FDevice, FPort, DC_BinNames,
PChar (BinArray), FDeviceMode^);
if NumBinsRec <> NumBinsReq then

begin

{raise an exception}
Raise EPrinter.Create ('Error retrieving Bin Source Info');
end;
{ if... }
{now convert to TStringList}
BinList := TStringList.Create;
for i := 1 to NumBinsRecdo

begin

BinStr := StrPas (BinArray^);
BinList.Add (BinStr);
end;
{ next i }
end;
{ if... }
FreeLibrary (DrvHandle);
Result := BinList;
end {:} else

begin

{raise an exception}
DriverName := StrPas (FDriver);
Raise EPrinter.Create ('Error loading driver '+DriverName);
end;
{ else
}
finally
if BinArray <> nil then

FreeMem (BinArray, NumBinsReq * SizeOf (TcchBinName));
end;
{ try }
end;
{ TPrintSet.GetBinSourceList }
function TPrintSet.GetPaperList: TStringList;
{-returns the current list of paper sizes (returns nil for none)}
type
TcchPaperName = array[0..CCHPaperName-1] of Char;
TPaperArray = array[1..cPaperNames] of TcchPaperName;
PPaperArray = ^TPaperArray;
var
NumPaperReq: Longint;
{number of paper types required}
NumPaperRec: Longint;
{number of paper types received}
PaperArray: PPaperArray;
PaperList: TStringList;
PaperStr: String;
i: Longint;
DevCaps: TFarProc;
DrvHandle: THandle;
DriverName: String;
begin

Result := nil;
PaperArray := nil;
try
DrvHandle := LoadLibrary (FDriver);
if DrvHandle <> 0 then

begin

DevCaps := GetProcAddress (DrvHandle, 'DeviceCapabilities');
if DevCaps<>nil then

begin

NumPaperReq := TDeviceCapabilities (DevCaps)(FDevice, FPort, DC_PaperNames,
nil, FDeviceMode^);
GetMem (PaperArray, NumPaperReq * SizeOf (TcchPaperName));
NumPaperRec := TDeviceCapabilities (DevCaps)(FDevice, FPort, DC_PaperNames,
PChar (PaperArray), FDeviceMode^);
if NumPaperRec <> NumPaperReq then

begin

{raise an exception}
Raise EPrinter.Create ('Error retrieving Paper Info');
end;
{ if... }
{now convert to TStringList}
PaperList := TStringList.Create;
for i := 1 to NumPaperRecdo

begin

PaperStr := StrPas (PaperArray^);
PaperList.Add (PaperStr);
end;
{ next i }
end;
{ if... }
FreeLibrary (DrvHandle);
Result := PaperList;
end {:} else

begin

{raise an exception}
DriverName := StrPas (FDriver);
Raise EPrinter.Create ('Error loading driver '+DriverName);
end;
{ else
}
finally
if PaperArray <> nil then

FreeMem (PaperArray, NumPaperReq * SizeOf (TcchPaperName));
end;
{ try }
end;
{ TPrintSet.GetPaperList }
procedure TPrintSet.SetDeviceMode;
{-updates the drived TDevMode structure}
var
DrvHandle: THandle;
ExtDevCaps: TFarProc;
DriverName: String;
ExtDevCode: Integer;
OutDevMode: PDevMode;
begin

DrvHandle := LoadLibrary (FDriver);
if DrvHandle <> 0 then

begin

ExtDevCaps := GetProcAddress (DrvHandle, 'ExtDeviceMode');
if ExtDevCaps<>nil then

begin

ExtDevCode := TExtDeviceMode (ExtDevCaps)
(0, DrvHandle, FDeviceMode^, FDevice, FPort,
FDeviceMode^, nil, DM_IN_BUFFER or DM_OUT_BUFFER);
if ExtDevCode <> IDOK then

begin

{raise an exception}
raise EPrinter.Create ('Error updating printer driver.');
end;
{ if... }
end;
{ if... }
FreeLibrary (DrvHandle);
end {:} else

begin

{raise an exception}
DriverName := StrPas (FDriver);
Raise EPrinter.Create ('Error loading driver '+DriverName);
end;
{ else
}
end;
{ TPrintSet.SetDeviceMode }
procedure TPrintSet.SaveToDefaults;
{-updates the default settings for the current printer}
var
DrvHandle: THandle;
ExtDevCaps: TFarProc;
DriverName: String;
ExtDevCode: Integer;
OutDevMode: PDevMode;
begin

DrvHandle := LoadLibrary (FDriver);
if DrvHandle <> 0 then

begin

ExtDevCaps := GetProcAddress (DrvHandle, 'ExtDeviceMode');
if ExtDevCaps<>nil then

begin

ExtDevCode := TExtDeviceMode (ExtDevCaps)
(0, DrvHandle, FDeviceMode^, FDevice, FPort,
FDeviceMode^, nil, DM_IN_BUFFER OR DM_UPDATE);
if ExtDevCode <> IDOK then

begin

{raise an exception}
raise EPrinter.Create ('Error updating printer driver.');
end {:} else

SendMessage ($FFFF, WM_WININICHANGE, 0, 0);
end;
{ if... }
FreeLibrary (DrvHandle);
end {:} else

begin

{raise an exception}
DriverName := StrPas (FDriver);
Raise EPrinter.Create ('Error loading driver '+DriverName);
end;
{ else
}
end;
{ TPrintSet.SaveToDefaults }
procedure TPrintSet.SetOrientation (Orientation: integer);
{-sets the paper orientation}
begin

FDeviceMode^.dmOrientation := Orientation;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_ORIENTATION;
end;
{ TPrintSet.SetOrientation }
function TPrintSet.GetOrientation: integer;
{-gets the paper orientation}
begin

Result := FDeviceMode^.dmOrientation;
end;
{ TPrintSet.GetOrientation }
procedure TPrintSet.SetPaperSize (Size: integer);
{-sets the paper size}
begin

FDeviceMode^.dmPaperSize := Size;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PAPERSIZE;
end;
{ TPrintSet.SetPaperSize }
function TPrintSet.GetPaperSize: integer;
{-gets the paper size}
begin

Result := FDeviceMode^.dmPaperSize;
end;
{ TPrintSet.GetPaperSize }
procedure TPrintSet.SetPaperLength (Length: integer);
{-sets the paper length}
begin

FDeviceMode^.dmPaperLength := Length;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PAPERLENGTH;
end;
{ TPrintSet.SetPaperLength }
function TPrintSet.GetPaperLength: integer;
{-gets the paper length}
begin

Result := FDeviceMode^.dmPaperLength;
end;
{ TPrintSet.GetPaperLength }
procedure TPrintSet.SetPaperWidth (Width: integer);
{-sets the paper width}
begin

FDeviceMode^.dmPaperWidth := Width;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PAPERWIDTH;
end;
{ TPrintSet.SetPaperWidth }
function TPrintSet.GetPaperWidth: integer;
{-gets the paper width}
begin

Result := FDeviceMode^.dmPaperWidth;
end;
{ TPrintSet.GetPaperWidth }
procedure TPrintSet.SetScale (Scale: integer);
{-sets the printer scale (whatever that is)}
begin

FDeviceMode^.dmScale := Scale;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_SCALE;
end;
{ TPrintSet.SetScale }
function TPrintSet.GetScale: integer;
{-gets the printer scale}
begin

Result := FDeviceMode^.dmScale;
end;
{ TPrintSet.GetScale }
procedure TPrintSet.SetCopies (Copies: integer);
{-sets the number of copies}
begin

FDeviceMode^.dmCopies := Copies;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_COPIES;
end;
{ TPrintSet.SetCopies }
function TPrintSet.GetCopies: integer;
{-gets the number of copies}
begin

Result := FDeviceMode^.dmCopies;
end;
{ TPrintSet.GetCopies }
procedure TPrintSet.SetBin (Bin: integer);
{-sets the paper bin}
begin

FDeviceMode^.dmDefaultSource := Bin;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_DEFAULTSOURCE;
end;
{ TPrintSet.SetBin }
function TPrintSet.GetBin: integer;
{-gets the paper bin}
begin

Result := FDeviceMode^.dmDefaultSource;
end;
{ TPrintSet.GetBin }
procedure TPrintSet.SetPrintQuality (Quality: integer);
{-sets the print quality}
begin

FDeviceMode^.dmPrintQuality := Quality;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_PRINTQUALITY;
end;
{ TPrintSet.SetPrintQuality }
function TPrintSet.GetPrintQuality: integer;
{-gets the print quality}
begin

Result := FDeviceMode^.dmPrintQuality;
end;
{ TPrintSet.GetPrintQuality }
procedure TPrintSet.SetColor (Color: integer);
{-sets the color (monochrome or color)}
begin

FDeviceMode^.dmColor := Color;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_ORIENTATION;
end;
{ TPrintSet.SetColor }
function TPrintSet.GetColor: integer;
{-gets the color}
begin

Result := FDeviceMode^.dmColor;
end;
{ TPrintSet.GetColor }
procedure TPrintSet.SetDuplex (Duplex: integer);
{-sets the duplex setting}
begin

FDeviceMode^.dmDuplex := Duplex;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_DUPLEX;
end;
{ TPrintSet.SetDuplex }
function TPrintSet.GetDuplex: integer;
{-gets the duplex setting}
begin

Result := FDeviceMode^.dmDuplex;
end;
{ TPrintSet.GetDuplex }
procedure TPrintSet.SetYResolution (YRes: integer);
{-sets the y-resolution of the printer}
var
PrintDevMode: Print.PDevMode;
begin

PrintDevMode := @FDeviceMode^;
PrintDevMode^.dmYResolution := YRes;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_YRESOLUTION;
end;
{ TPrintSet.SetYResolution }
function TPrintSet.GetYResolution: integer;
{-gets the y-resolution of the printer}
var
PrintDevMode: Print.PDevMode;
begin

PrintDevMode := @FDeviceMode^;
Result := PrintDevMode^.dmYResolution;
end;
{ TPrintSet.GetYResolution }
procedure TPrintSet.SetTTOption (Option: integer);
{-sets the TrueType option}
var
PrintDevMode: Print.PDevMode;
begin

PrintDevMode := @FDeviceMode^;
PrintDevMode^.dmTTOption := Option;
FDeviceMode^.dmFields := FDeviceMode^.dmFields or DM_TTOPTION;
end;
{ TPrintSet.SetTTOption }
function TPrintSet.GetTTOption: integer;
{-gets the TrueType option}
var
PrintDevMode: Print.PDevMode;
begin

PrintDevMode := @FDeviceMode^;
Result := PrintDevMode^.dmTTOption;
end;
{ TPrintSet.GetTTOption }
destructor TPrintSet.Destroy;
{-destroys class}
begin

if FDevice <> nil then

FreeMem (FDevice, 255);
if FDriver <> nil then

FreeMem (FDriver, 255);
if FPort <> nil then

FreeMem (FPort, 255);
inherited Destroy;
end;
{ TPrintSet.Destroy }
procedure Register;
{-registers the printset component}
begin

RegisterComponents('Domain', [TPrintSet]);
end;
{ Register }
end.
{ EDSPrint }

 
FastReport中Fanfold 15×11 inch纸张(宽行打印纸)对应的pgsize值是多少???
fr.pages.Pages[0].ChangePaper(ASize, AWidth, AHeight,abin: Integer;
AOr: TPrinterOrientation);
//(256,3800,2800, 0,poPortrait);
我用这条语句好像没什么作用,系统打印的时候仍然默认为A4
 
后退
顶部