oPrn:SetCopies() bug ?

Post Reply
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

oPrn:SetCopies() bug ?

Post by Davide »

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

Post by Davide »

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

#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

Post by Davide »

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 ?
Post Reply