I have a PDF file with some scripting inside. The scripts are allowed to change the printer to which the document is being printed (because we have dedicated printer for barcodes and other printer for regular documents). The problem is, I have no idea how to reset the printer to the computer's default one.

The printing code is as following:

```
var pp = getPrintParams(); // get printing parameters
pp.interactive = pp.constants.interactionLevel.automatic; // do not prompt user
pp.printerName = 'barcode_printer'; // set printer name
this.print(pp); // print

```

According to the [JavaScript API Reference](http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf) (pages 314, 583), the `getPrintParams()` returns default print parameters and `pp.printerName` set to `''` (empty string) means default printer. I realized that none of that is true. Actually `getPrintParams()` returns last used parameters (not a new/default one) and `pp.printerName = ''` does not reset printer to the default one, instead it uses last chosen printer.

Moreover the `PrintParams` object seems to be shared across different opened documents, so I cannot store the name of default printer (read from first call of `getPrintParams()`) in some variable, because actually I don't know if the read value refers to the default printer or it was already changed by other opened documents.

The behavior is consistent across different versions of Adobe Reader (9, 10, 11) and Foxit Reader.

Please help, how to reset programmatically the printer to the default one?