LlPrintAbort

Syntax:

INT LlPrintAbort (HLLJOB hJob);

Task:

Aborts the print (an incomplete page will remain incomplete or may not be printed).

Parameter:

hJob: List & Label job handle

Return Value:

Error code

Hints:

Is necessary to abort the print by code if LlPrintWithBoxStart() is not used and print abortion is necessary.

The difference to the 'normal' end, i.e. no longer having to call LlPrint() or LlPrintFields() is that data which is still in the printer driver is discarded, so that the print may be ended halfway through a page.

The LlPrint...() calls following this call will return LL_USER_ABORTED, so your print loop will be ended automatically.

Example:

HLLJOB hJob;
hJob = LlJobOpen(0);

if (LlPrintStart(hJob, LL_PROJECT_LABEL, "test.lbl",
   LL_PRINT_NORMAL) == 0)
{
   for all data records
   {

      <... etc...>
      if (bDataError)
         LlPrintAbort(hJob);
   }
   LlPrintEnd(hJob);
}
else
   MessageBox(NULL, "error", "List & Label", MB_OK);
LlJobClose(hJob);

See also:

LlPrintStart, LlPrintWithBoxStart, LlPrintEnd