Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> pjbrewind()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PJbRewind()
------------------------------------------------------------------------------
 Purpose:
 Rewinds a print job by bytes/pages/copies.

 Syntax:
 bResult = PJbRewind( wPtrNum, bPage, bAbs, wCopies, lAmount )

 Parameters:
 wPtrNum The printer number.
 bPage   The rewind by page flag.
 bAbs    The rewind absolute or relative flag.
 wCopies The number of copies to rewind.
 lAmount The number of pages or bytes to rewind.

 Returns:
 A boolean value (TRUE or FALSE).

 The CA-Clipper name for this function is:
 PJbRewind()

 Description:
 PJbRewind() rewinds a print job, so that it will restart printing from
 a previous point in the print job. PJbRewind() is useful if a printer
 has torn the paper or the ribbon has run out, because it can be made to
 continue printing from a position within a print job rather than
 restarting the entire job from the beginning.

 Parameter wPtrNum is the printer number. Parameter bPage is set to TRUE if
 the job is to be rewound by a number of pages or FALSE if the job is to be
 rewound by a number of bytes. Parameter bAbs is set to TRUE if the print
 job is to be rewound relative to its current point, or FALSE if it is to be
 rewound relative to the job's beginning. wCopies is the copy from which to
 restart printing if the print job has more than one copy. lAmount is the
 number of pages or bytes to rewind.
 wCopies is ignored if bAbs is set to TRUE. If bPage is set to TRUE ( rewind
 by page ), and bAbs is set to FALSE ( rewind relative to beginning ),
 lAmount is the number of the page from which to restart printing.

 If bPage is set to TRUE and bAbs is set to TRUE, lAmount is the number of
 pages (forward or backwards) to rewind the print job relative to its
 current position. Negative numbers are backward, positive numbers are
 forward.
 If bPage is set to FALSE (rewind by bytes), and bAbs is set to TRUE (rewind
 from current position), lAmount is the number of bytes forward or backwards
 to rewind the print job relative to the current position. Negative numbers
 are backward, positive numbers are forward.
 Returns TRUE if successful, and FALSE if an error occurs.

 Example:
 // To log in to print server PRINTERS and rewind the current print job
 // on printer 0 back to the beginning:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    PJbRewind( 0, TRUE, FALSE, 0, 1 )
 endif
 // To log in to print server PRINTERS and rewind the current print job on
 // printer 0 to the beginning of the page that it is currently printing:
 if( PSWSLogin( "PRINTERS" ) > 0 )
    PJbRewind( 0, TRUE, TRUE, 0, -1 )
 endif
 // To log in to print server PRINTERS and rewind the current print job on
 // printer 0 to the beginning of the copy that it is currently printing:
 if( PSWSLogin( "PRINTERS" ) > 0 )
    iCopy = PJbCopyDoneGet ( 0 )
    PJbRewind( 0, TRUE, FALSE, iCopy + 1, 1 )
 endif

 Notes:
 It is only possible to be logged in to one print server at a time.

See Also: PSWSLogin() PJbCopyDoneGet() PJbBytesDoneGet() PrnStatusGet() PrnErrorStatusGet()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson