I am working on a project where I am loading pdf's which contains a form. After the user has filled the form, I would like to save the PDF on the server after a button click. How can I achieve that? Thank you.
Code :
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>PDF edit</title>
</head>
<body>
<style>
</style>
<?php
$file = 'dummy.pdf';
$filename = 'dummy.pdf';
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="' . $filename . '"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' . filesize($file));
header('Accept-Ranges: bytes');
@readfile($file);
?>
<p>
<button type="button">Save!</button>
</p>
</body>
</html>