ArcGIS Pro 2.7 API Reference Guide
Export(ExportFormat) Method
Example 

ArcGIS.Desktop.Layouts Namespace > Layout Class > Export Method : Export(ExportFormat) Method
ExportFormat
Export a layout to a variety of formats. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void Export( 
   ExportFormat exportFormat
)
Public Overloads Sub Export( _
   ByVal exportFormat As ExportFormat _
) 

Parameters

exportFormat
ExportFormat
Exceptions
ExceptionDescription
This method must be called within the lambda passed to QueuedTask.Run.
Remarks

This overload is intended to export a single page layout to a supported output file format. Even if a map series is present, if this overload is chosen, the current layout page will be exported to file.

Each ExportFormat has its own set of configurable set of parameters such as OutputFileName and Resolution. You must first create the export format and then provide that as the only required input parameter.

Example
Below is a simple PDF exmaple but multiple examples are provided with each supported format derived from ArcGIS.Desktop.Mapping.ExportFormat.
//Export a single page layout to PDF.

//Create a PDF format with appropriate settings
//BMP, EMF, EPS, GIF, JPEG, PNG, SVG, TGA, and TFF formats are also available for export
PDFFormat PDF = new PDFFormat()
{
  OutputFileName = filePath,
  Resolution = 300,
  DoCompressVectorGraphics = true,
  DoEmbedFonts = true,
  HasGeoRefInfo = true,
  ImageCompression = ImageCompression.Adaptive,
  ImageQuality = ImageQuality.Best,
  LayersAndAttributes = LayersAndAttributes.LayersAndAttributes
};

//Check to see if the path is valid and export
if (PDF.ValidateOutputFilePath())
{
  await QueuedTask.Run(() => layout.Export(PDF));  //Export the layout to PDF on the worker thread
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Layout Class
Layout Members
Overload List