Search
 
SCRIPT & CODE EXAMPLE
 

PHP

view a pdf file in the browser using the php header function

$file = 'headerPdfFile.pdf';

$filename = 'IamPdfFile.pdf';
  
// Header content type
header('Content-type: application/pdf');
  
header('Content-Disposition: inline; filename="' . $filename . '"');  
  
// Read the file
@readfile($file);
Comment

php header pdf

<?php
header("Pragma: public");
    header("Expires: 0");
    header("Accept-Ranges: bytes");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/pdf");
    header("Content-Disposition: attachment; filename=order.pdf");
    header("Content-Transfer-Encoding: binary");
Comment

PREVIOUS NEXT
Code Example
Php :: codegreper 
Php :: image acf 
Php :: php make query string from array 
Php :: php str_replace 
Php :: get information from another website 
Php :: laravel request all except 
Php :: php ucfirst all words 
Php :: download php7.4-mbstring ubuntu 
Php :: enqueue wordpress 
Php :: disable admin bar wordpress 
Php :: laravel get file name 
Php :: laravel run migration 
Php :: php code to convert to small letter 
Php :: php directory exists 
Php :: php remove quotes 
Php :: php set timezone italy 
Php :: file_get_contents timeout 
Php :: formate date using carbon in laravel blade 
Php :: Add 2 days to the current date in PHP 
Php :: php remove parentheses and contents from string 
Php :: Add [nom] to fillable property to allow mass assignment 
Php :: php get current url without filename 
Php :: disable foreign key laravel 
Php :: laravel collection flatten 
Php :: get acf repeater field 
Php :: laravel get random row 
Php :: php search on array 
Php :: how to connect to a database in php 
Php :: get_posts category 
Php :: laravel delete confirm link 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =