Is there some command to force a printer to print single-sided? I see there's a command prnduplex() but can't find any documentation.
Is there some command to force a printer to print single-sided? I see there's a command prnduplex() but can't find any documentation.
PRNDUPLEX( nValue )/* duplex enable */
#define DMDUP_SIMPLEX Â Â 1
#define DMDUP_VERTICAL Â 2
#define DMDUP_HORIZONTAL 3Thanks, but how would you restore printing to single sided? It seems that with MAC computers the default is double sided, o r if someones printer is set to double sided and I want to switch to single sided how would i do it? Would prnduplex(0) work?
PRNDUPLEX( DMDUP_SIMPLEX )DMDUP_SIMPLEX Normal (nonduplex) printing.All my printing is always single-sided and I would love to have double-sided as an option. Yes, my printer supports it.
I see the objective here is to push single sided, but what if I wanted it to be double sided ?
Thanks.
OK but DMDUP_SIMPLEX is a variable that does not exist. I would suspect it represents a numeric value and perhaps that is 0???
Please, both of you, carefully reread my first message! There is all you need.
Got it! thanks Enrico. My brain cells were not all firing I guess.
I've had two recent eye surgeries, and didn't have corrective lenses ( to see the text clearly ) until today.
Re-reading this, and the reference page, I would do the following:
Single Sided =. PrnDuplex( 1 )
Dual sided, Landscape = PrnDuplex( 3 )
Dual sided, Portrait = PrnDuplex( 2 )
Now ... If my printer defaults to Single Sided, and I select Duplex for a print job, do I need to issue the command to return to simplex at the end of a job, or will it automatically default back ?
I don't know. Please try and let us know.
HB_FUNC( PRNDUPLEX ) // ( nValue ) --> nOldValue
{
LPDEVMODE lpDevMode;
int dmDuplex;
PrinterInit();
lpDevMode = (LPDEVMODE) GlobalLock( pd.hDevMode );
dmDuplex = lpDevMode->dmDuplex;
if( hb_pcount() > 0 )
lpDevMode->dmDuplex = hb_parni( 1 );
hb_retni( dmDuplex );
GlobalUnlock( pd.hDevMode );
}Dear Tim,
Checking it with Mr. Rao
many thanks for your feedback
TimStone wrote:Note that is does not take the value passed.
lpDevMode->dmDuplex = hb_parni( 1 );