code: def generate_pdf_report(self, impact_function, iface, scenario_name):
          
          # output folder
          output_dir = self.output_directory.text()
          file_path = os.path.join(output_dir, scenario_name)
  
          # create impact table report instance
          table_report_metadata = ReportMetadata(
              metadata_dict=standard_impact_report_metadata_pdf)
          impact_table_report = ImpactReport(
              iface,
              table_report_metadata,
              impact_function=impact_function)
          impact_table_report.output_folder = file_path
          impact_table_report.process_components()
  
          # create impact map report instance
          map_report_metadata = ReportMetadata(
              metadata_dict=update_template_component(map_report))
          impact_map_report = ImpactReport(
              iface,
              map_report_metadata,
              impact_function=impact_function)
          # TODO: Get from settings file
  
          # get the extent of impact layer
          impact_map_report.qgis_composition_context.extent = \
              impact_function.impact.extent()
          impact_map_report.output_folder = file_path
          impact_map_report.process_components()
docs: Generate and store map and impact report from impact function.
  
          Directory where the report stored is specified by user input from the
          dialog. This function is adapted from analysis_utilities.py
  
          :param impact_function: Impact Function.
          :type impact_function: ImpactFunction()
  
          :param iface: iface.
          :type iface: iface
  
          :param scenario_name: name of the scenario
          :type scenario_name: str