You can print a sheet to a Portable Document Format (PDF) file.
To print to PDF, use the PrintToPdf method in the PrintInfo class. Use the PdfFileName
property to specify the file name and location to which to save the file. There
are many additional settings that you can use to customize PDF output.