oPrn:SetCopies() bug ?

oPrn:SetCopies() bug ?

Postby Davide » Tue Nov 20, 2007 2:20 pm

Hello guys,

I've just noticed that oPrn:SetCopies(nCopies) works ok if the printed document is longer than 1 page, otherwise I always obtain a single copy.
I tried with different printers and machines, with or without PREVIEW (If PREVIEW a 2+ pages document and print them all I obtain n copies, while if I print only 1 page on a multipage preview I obtain only a single printed page)

Any clues ?

TIA
Davide
FWH 7.09
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Davide » Wed Nov 21, 2007 1:06 am

I've just tested FWH27 (xH) and found it behaved the same.

I've also found this function in printdc.c, but cannot see why it should work only for multipage documents.

Any idea ?

Thanks,
Davide

Code: Select all  Expand view
#ifdef __HARBOUR__
   CLIPPER PRNSETCOPIES( PARAMS ) // ( nCopies )  --> lSuccess
#else
   CLIPPER PRNSETCOPI( PARAMS ) // ES( nCopies )  --> lSuccess
#endif
{
   LPDEVMODE lpDevMode;

   PrinterInit();

   lpDevMode = (LPDEVMODE) GlobalLock( pd.hDevMode );

   lpDevMode->dmCopies = _parni( 1 );

   if( PCOUNT() == 2 )  // Compatibility with previous syntax!
      lpDevMode->dmCopies = _parni( 2 );

   GlobalUnlock( pd.hDevMode );

   _retl( TRUE );
}
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Davide » Wed Nov 21, 2007 1:52 am

Ok, I've found out another printer (Brother) which works correctly, so it seems the problem is in the driver of the "HP LaserJet 5/5M PS" and the "HP LaserJet 4100" (maybe they both use the same driver).

Does that happened to anyone else before ?
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 8 guests