$notFound = $this->notFoundHandler;
return $notFound($request, $response);
}
+ return $response;
}
)->setName('csv-memberslist')->add($authenticate);
$pdf = new PdfMembersCards($this->preferences);
$pdf->drawCards($members);
- $response = $this->response->withHeader('Content-type', 'application/pdf');
- $response->write($pdf->Output(_T("Cards") . '.pdf', 'D'));
+ $response = $this->response->withHeader('Content-type', 'application/pdf')
+ ->withHeader('Content-Disposition', 'attachment;filename="' . $pdf->getFileName() . '"');
+ $response->write($pdf->download());
return $response;
}
)->setName('pdf-members-cards')->add($authenticate);
$pdf = new PdfMembersLabels($this->preferences);
$pdf->drawLabels($members);
- $response = $this->response->withHeader('Content-type', 'application/pdf');
- $response->write($pdf->Output(_T("labels_print_filename") . '.pdf', 'D'));
+ $response = $this->response->withHeader('Content-type', 'application/pdf')
+ ->withHeader('Content-Disposition', 'attachment;filename="' . $pdf->getFileName() . '"');
+ $response->write($pdf->download());
return $response;
-
}
)->setName('pdf-members-labels')->add($authenticate);
$form = $this->preferences->pref_adhesion_form;
$pdf = new $form($adh, $this->zdb, $this->preferences);
- $response = $this->response->withHeader('Content-type', 'application/pdf');
+ $response = $this->response->withHeader('Content-type', 'application/pdf')
+ ->withHeader('Content-Disposition', 'attachment; filename="' . $pdf->getFileName() . '"');
$response->write($pdf->download());
return $response;
}
function ($request, $response) {
$form = $this->preferences->pref_adhesion_form;
$pdf = new $form(null, $this->zdb, $this->preferences);
- $response = $this->response->withHeader('Content-type', 'application/pdf');
+ $response = $this->response->withHeader('Content-type', 'application/pdf')
+ ->withHeader('Content-Disposition', 'attachment; filename="' . $pdf->getFileName() . '"');
$response->write($pdf->download());
return $response;
}
$response = $this->response->withHeader('Content-type', 'application/pdf');
$response->write($pdf->Output(_T("attendance_sheet") . '.pdf', 'D'));
return $response;
-
}
)->setName('attendance_sheet')->add($authenticate);