Skip to content

Instantly share code, notes, and snippets.

@azinkey
Created January 21, 2019 06:54
Show Gist options
  • Save azinkey/21c4c2fb5422c2e747ba3b96cc11d739 to your computer and use it in GitHub Desktop.
Save azinkey/21c4c2fb5422c2e747ba3b96cc11d739 to your computer and use it in GitHub Desktop.
ob_clean();
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="filename_here.pdf"');
header('Content-Transfer-Encoding: binary');
echo base64_decode($content);
ob_end_clean();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment