public function getPdf(Request $request) {
    $content = $this->getPdfContent($request);
    $settings = [
      'body' => [
        '#content' => [
          'logo_url' => drupal_get_path('module', 'openy_repeat') . '/img/ymca_logo_black.png',
          'result' => $content['content']['content'],
          'header' => $content['content']['header']
        ],
        '#theme' => $content['theme'],
        '#cache' => [
          'max-age' => 0
        ],
      ],
      'title' => $this->t("Download PDF schedule"),
      '#cache' => [
        'max-age' => 0
      ],
    ];
    \Drupal::service('openy_repeat_pdf_generator')->generatePDF($settings);
  }