I tried using 'spool.pr.copies' but I don't understand it because I don't have any more knowledge or examples. I tried to research but I couldn't find it. Can anyone help me?
Hi Chamiporn H.,
It has been a while since I used the 'spool.pr.copies' predefined variable, and working from a home office, I do not have access to a physical printer to verify the following.
The 'spool.pr.copies' predefined variable should match the Copies option in the Select Device settings on the Printer tab. It only applies to Printers.
The Copies number can be used in the Printer settings of the Device. For example, I have seen it being passed as an argument '%d' is the Device Queue. On our (on premise) environment on Linux, the Device queue for a Direct printer has a command 'lpp -<printer> -n%d %s' to print the output 'd' times.
Other Device Types, e.g., with an actual Device Queue, must be handling this differently.
Depending on your environment, I suggest to try the 'Copies' option first to confirm that it is working for the Device.
From a programming perspective, I believe that you need to set 'spool.pr.copies' before opening the spooler (rprt_open(), brp.open(), or spool.open()). At least that is how one of the other predefined spooler variables, e.g., 'spool.fileout', work.
Yours,Stephan