Actually the problem can be worked around using the global
object, which is shared across multiple opened documents in one instance of adobe reader.
First time, the document is loaded, I check whether global
object contains (my own) property defaultPrinter
, unless that I call getPrintParams()
, read the printerName
field and assign it to the global.defaultPrinter
. Then I can just read the field to obtain the default's printer name. The code is as follwing:
if (global.defaultPrinter === undefined) {
global.defaultPrinter = getPrintParams().printerName;
}