FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Save & Restore paper size
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Save & Restore paper size
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Save & Restore paper size
Posted: Fri Nov 12, 2010 06: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.


FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Save & Restore paper size
Posted: 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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Save & Restore paper size
Posted: Mon Nov 15, 2010 02:52 AM

Hua,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion