public function exportComparativeReportByYearPdf(ClientSurvey $client_survey, GetComparativeReportByYear $request): Response|View 	{ 		$locale = $request->comparative_language_by_year ?? DomainLanguages::getDefaultLanguage(); 		$client_survey->load(['survey.categories.questions.answers', 'applicants' => function ($query) { 			$query->available()->final(); 		}]);  		$matrix = $this->createMatrix($client_survey, $request, $locale); 		$this->prepareComparativeDataObject($client_survey, $request, $matrix, $locale);  		$this->comparativePdfService->canGenerateComparativeReport($client_survey, $this->comparativeDataObject->getApplicants(), $locale);  		$is_preview = !$request->boolean('download'); 		$view = $this->getComperativeReport($client_survey, $this->comparativeDataObject, $locale, $is_preview);  		$userActivityService = new UserActivityService($request); 		$userActivityService->createCustomEntry($client_survey, UserActivityType::Read);  		if ($is_preview) { 			return $view; 		}  		$data = $this->chromePdfService->generatePdf($view->render()); 		$name = $client_survey->generateDownloadFileNameForComparativeReport($locale, 'download-file-name-comparative-report-by-year');  		return response()->make($data, 200, [ 			'Content-Type' => 'application/pdf', 			'Content-Disposition' => "attachment; filename=$name", 		]); 	}