Answers for "download pdf php"

PHP
1

download pdf php

<?php 
echo '<a href="FileLink" download="newfilename">Download the pdf</a>';
//It will work for all kind of file.
?>
Posted by: Guest on April-08-2021
0

php pdf

<?php
// We'll be outputting a PDF
header('Content-Type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>
Posted by: Guest on May-11-2021

Browse Popular Code Answers by Language