Thanks for your quick reply Gilad. What about printing silently to the desktop or another specified location without user interaction? In other words I don't want the save as prompt to pop up. Thanks.
No, that's not possible, either. You should look for another solution.
Thanks again Gilad. I installed PDFCreator which is a PDF printer driver that allows automatic saving based on a specified location so that solution works for me. However, my code doesn't seem to work I can run both separately without problems but when I combine them together the function doesn't appear to be called correctly. Anyone have any input or suggestions?
cName: "flattenactiveformBtn", // A name for your button
cExec: "customsilentprint()", // Function to call
cLabel: "Flatten Active Form", // The Text on the Button
var pp = getPrintParams(); // Get printing parameters
pp.interactive = pp.constants.interactionLevel.automatic; // Do not prompt user
pp.printerName = 'PDFCreator'; // Set printer name
this.print(pp); // Print