Save & Restore paper size

Save & Restore paper size

Postby hua » Fri Nov 12, 2010 10:00 am

Guys,
What function to use to get the current paper type/size and later on restore it?

TIA
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Save & Restore paper size

Postby James Bott » Fri Nov 12, 2010 6:37 pm

Hua,

This info from my notes may help.

Regards,
James

------------------------
oPrinter:setSize( nWidth, nHeight )

Where nWidth and nHeight are in tenths of a millimeter.

25.4 millimeters per inch

So to set the size in inches

oPrinter:setSize( 254 * nWidth, 254 * nHeight)

Where nWidth and nHeight are in inches.

--------------------------
oPrinter:GetPhySize()

An array with the dimensions of the paper: {nHeight ,Width}
Units of height and width are not given in the help file.

----------------------------
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Save & Restore paper size

Postby hua » Sun Nov 14, 2010 12:22 pm

Thanks for the reply James. I found those 2 and had tried using them but couldn't get them to work properly as I'm not sure how to correctly convert the values returned by oPrinter:GetPhySize()
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Save & Restore paper size

Postby James Bott » Mon Nov 15, 2010 2:52 am

Hua,

Well what paper size is the printer set for and what is oPrinter:GetPhySize() returning?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 96 guests