Weird, the script is just the default script of the print button ans should work.
Did you test if the error also occurs of another users computer? It's possibly just a local problem.
I found a few threads regarding ths problem you should check:
adobe xi std will not print to pdf access denied
How to fix broken "Print to AdobePDF" ?
You also can try a custom script like
var pp = event.target.getPrintParams(); pp.printerName = "Adobe PDF"; event.target.print(pp);
or just
app.execMenuItem("Print");