Valid from List & Label 8
Starting with version 8.0 the handling of copies has been made much easier. Since a couple of versions you've been able to suppress the numbers of copies in the print options dialog by setting
LlPrintSetOption(hJob, LL_PRNOPT_PRNTDLG_ONLYPRINTERCOPIES, True)
if the printer doesn’t support hardware copies. Since version 8, the call to LL_PRNOPT_COPIES_SUPPORTED after showing the dialog is no longer necessary. If you want to let the printer handle you’re copies, no further steps need to be made.
However, if you want to support copies even if the printer doesn’t, use the following construct:
LLPrintOptionsDialog(...);
if (LlPrintGetOption(hJob, LL_PRNOPT_COPIES_SUPPORTED) == 0)
{
nCopies = LlPrintGetOption(hJob, LL_PRNOPT_COPIES);
LlPrintSetOption(hJob, LL_PRNOPT_COPIES, 1);
LlPrintGetOption(hJob, LL_PRNOPT_COPIES_SUPPORTED);
}
// manual copies
// using loop
It’s absolutely necessary in this case to confirm the manually set number of copies by querying LL_PRNOPT_COPIES_SUPPORTED. This also holds if you want to handle copies completely by your own code. In this case, you would code something like
LLPrintOptionsDialog(...);
int nCopies = LlPrintGetOption(hJob, LL_PRNOPT_COPIES);
LlPrintSetOption(hJob, LL_PRNOPT_COPIES, 1);
LlPrintGetOption(hJob, LL_PRNOPT_COPIES_SUPPORTED);
// manual copies
// using loop
You must always query LL_PRNOPT_COPIES_SUPPORTED after setting the number of copies manually.
IDKBTE000576 KBTE000576