ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ExportFormat Class / Resolution Property
Example

In This Topic
    Resolution Property (ExportFormat)
    In This Topic
    Gets or sets the resolution of the export file in dots per inch (DPI).
    Syntax
    public int Resolution {get; set;}
    Public Property Resolution As Integer
    Remarks
    The default value is 96.
    Example
    Export a map frame to JPG
    {
      //Export a map frame to JPG.
      string filePath = @"Path and file name for the output export file";
      //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,
        ColorMode = JPEGColorMode.TwentyFourBitTrueColor,
        Height = 800,
        Width = 1200
      };
    
      //Export on the worker thread
      await QueuedTask.Run(() =>
      {
        //Reference the map frame
        MapFrame mf = layout.FindElement("MyMapFrame") as MapFrame;
    
        //Check to see if the path is valid and export
        if (JPG.ValidateOutputFilePath())
        {
          mf.Export(JPG);  //Export the map frame to JPG
        }
      });
    }
    Export the map view associated with a map frame to BMP
    {
      //Export the map view associated with a map frame to BMP.
      string filePath = @"Path and file name for the output export file";
      //Create BMP format with appropriate settings
      //EMF, EPS, GIF, JPEG, PDF, PNG, SVG, TGA, and TFF formats are also available for export
      BMPFormat BMP = new BMPFormat()
      {
        Resolution = 300,
        Height = 500,
        Width = 800,
        HasWorldFile = true,
        OutputFileName = filePath
      };
    
      //Export on the worker thread
      await QueuedTask.Run(() =>
      {
        MapView mv_bmp = mapFrame.GetMapView(layoutView);
        if (mv_bmp != null)
        {
          //Check to see if the path is valid and export
          if (BMP.ValidateOutputFilePath())
          {
            mv_bmp.Export(BMP);  //Export to BMP
          }
        }
      });
    }
    Export report to pdf
    {
      await QueuedTask.Run(() =>
      {
        //Define Export Options
        var exportOptions = new ReportExportOptions
        {
          ExportPageOption = ExportPageOptions.ExportAllPages,
          TotalPageNumberOverride = 0
    
        };
        //Create PDF format with appropriate settings
        string path = $@"{Project.Current.HomeFolderPath}\ReportExport.pdf";
        PDFFormat pdfFormat = new PDFFormat();
        pdfFormat.Resolution = 300;
        pdfFormat.OutputFileName = path;
        report.ExportToPDF($"{report.Name}", pdfFormat, exportOptions, true);
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also