PHP PDF SetSubject function is used to set the subject of a PDF document. The subject is generally used as a brief description of the content of the PDF file.
Example 1: Setting Subject of PDF Document using FPDF library
$pdf = new FPDF(); $pdf->SetTitle('PDF Document Title'); $pdf->SetSubject('PDF Document Subject');
In this example, we are using the FPDF library to create a PDF document. The SetTitle() function is used to set the title of the document while the SetSubject() function is used to set the subject.
Example 2: Setting Subject of PDF Document using TCPDF library
In this example, we are using the TCPDF library to create a PDF document. The SetAuthor() function is used to set the author of the document while the SetTitle() function is used to set the title. The SetSubject() function is used to set the subject of the PDF file.
Both examples use different packages of PDF libraries, i.e., FPDF and TCPDF.
PHP PDF::SetSubject - 30 examples found. These are the top rated real world PHP examples of PDF::SetSubject extracted from open source projects. You can rate examples to help us improve the quality of examples.