ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Reports Namespace / Report Class / ExportToPDF Method
Output file name.
Provides PDFFormat export options.
Report export options.
Use the MapMember selection. If set to false, will override the default behavior and force all records to be exported.
Example

In This Topic
    ExportToPDF Method
    In This Topic
    Export a report to a PDF format. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    outputName
    Output file name.
    exportFormat
    Provides PDFFormat export options.
    reportExportOptions
    Report export options.
    useSelection
    Use the MapMember selection. If set to false, will override the default behavior and force all records to be exported.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    The OutputFileName is invalid.
    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);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also