my $pdf = $c->model('DB::PDFDokumente')->search({ id => $args[0] }); $c->res->header('Content-Type' => 'application/pdf'); $c->res->write($pdf[0]->dokument);