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

ArcGIS.Desktop.Layouts Namespace > MapFrame Class : Export 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 Sub Export( _
   ByVal exportFormat As ExportFormat _
) 

Parameters

exportFormat
ExportFormat
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
Multiple examples are provided with each format derived from ArcGIS.Desktop.Mapping.ExportFormat.
Example
//Export a map frame to JPG.

//Create JPEG format with appropriate settings
//BMP, EMF, EPS, GIF, PDF, PNG, SVG, TGA, and TFF formats are also available for export
JPEGFormat JPG = new JPEGFormat()
{
  HasWorldFile = true,
  Resolution = 300,
  OutputFileName = filePath,
  JPEGColorMode = JPEGColorMode.TwentyFourBitTrueColor,
  Height = 800,
  Width = 1200
};

//Reference the map frame
MapFrame mf = layout.FindElement("MyMapFrame") as MapFrame;

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

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapFrame Class
MapFrame Members