ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ExportPageOptions Enumeration
Example Example

In This Topic
    ExportPageOptions Enumeration
    In This Topic
    Specifies the export page options.
    Syntax
    Members
    MemberDescription
    ExportAllPages Export all pages.
    ExportByPageRange Export a custom page range.
    ExportCurrentPageOnly Export the current page only. This option is not honored in the native service. It must be converted to ExportSelectedPage before passing to service.
    ExportEvenPagesOnly Export even pages only.
    ExportLastPage Export the last page only.
    ExportOddPagesOnly Export odd pages only.
    ExportSelectedIndexFeatures Export the selected index features.
    ExportSelectedPage Export the selected page.
    ExportSelectedTOCPages Export the selected TOC pages.
    Example
    Export report to pdf
    //Note: Call within QueuedTask.Run()
    //Define Export Options
    var exportOptions = new ReportExportOptions
    {
      ExportPageOption = ExportPageOptions.ExportAllPages,
      TotalPageNumberOverride = 0
    
    };
    //Create PDF format with appropriate settings
    PDFFormat pdfFormat = new PDFFormat();
    pdfFormat.Resolution = 300;
    pdfFormat.OutputFileName = path;
    report.ExportToPDF($"{report.Name}", pdfFormat, exportOptions, useSelection);
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Desktop.Mapping.ExportPageOptions

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also