** Get info on system printers Let printInfo = GetPrinterInfo() ** Search for acrobat distiller. The printer list from GetPrinterInfo ** starts at index 2 so we subtract 2 to get the index needed by OpenPrinter Let distillerIndex = Search(printInfo, 'Acrobat Distiller')-2 ** If Acrobat distiller is not on the system Search will return -1 if distillerIndex<0 then Echo "Acrobat Distiller is not installed" exit script endif ** Open Printer using distiller. Orientation will be landscape which is the default ** Number of copies = 1. The title will be used by distiller to compose the file name ** for the PDF file i.e. Graph1.PDF OpenPrinter /title Graph1 /index {distillerIndex} ** Now print the graph ** Major axis on minor axis off. All margins 20mm. PrintGraph /major on /minor off /margin 20 20 20 20 /caption "Test Print" ** Close Printer. This will actually start the print ClosePrinter