my $filename = "Rechnung_".$rgnr.".pdf"; $http_headers_out{'Cache-Control'} = ": no-cache, must-revalidate"; $http_headers_out{'Expires'} = ": Sat, 26 Jul 1997 05:00:00 GMT"; $http_headers_out{'Content-type'} = ": application/pdf"; $http_headers_out{'Content-Disposition'} = ": attachment; filename=$filename"; $http_headers_out{'Content-Transfer-Encoding'} = ": binary"; binmode(STDOUT); print output;