app/Report/ReportPdf.php
public function setup(): void
    {
        parent::setup();

        // Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
        $this->pdf = new ReportTcpdf($this->orientation, parent::UNITS, [
            $this->page_width,
            $this->page_height,
        ], self::UNICODE, 'UTF-8', self::DISK_CACHE);

        // Setup the PDF margins
        $this->pdf->SetMargins($this->left_margin, $this->top_margin, $this->right_margin);
        $this->pdf->setHeaderMargin($this->header_margin);
        $this->pdf->setFooterMargin($this->footer_margin);
        //Set auto page breaks
        $this->pdf->SetAutoPageBreak(true, $this->bottom_margin);
        // Set font subsetting
        $this->pdf->setFontSubsetting(self::SUBSETTING);
        // Setup PDF compression
        $this->pdf->SetCompression(self::COMPRESSION);
        // Setup RTL support
        $this->pdf->setRTL($this->rtl);
        // Set the document information
        $this->pdf->SetCreator(Webtrees::NAME . ' ' . Webtrees::VERSION);
        $this->pdf->SetAuthor($this->rauthor);
        $this->pdf->SetTitle($this->title);
        $this->pdf->SetSubject($this->rsubject);
        $this->pdf->SetKeywords($this->rkeywords);

        $this->pdf->setReport($this);

        if ($this->show_generated_by) {
            // The default style name for Generated by.... is 'genby'
            $element = new ReportPdfCell(0, 10, 0, 'C', '', 'genby', 1, ReportBaseElement::CURRENT_POSITION, ReportBaseElement::CURRENT_POSITION, 0, 0, '', '', true);
            $element->addText($this->generated_by);
            $element->setUrl(Webtrees::NAME . ' ' . Webtrees::VERSION);
            $this->pdf->addFooter($element);
        }
    }
public function setup(): void
    {
        parent::setup();

        // Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4
        $this->pdf = new ReportTcpdf($this->orientation, parent::UNITS, [
            $this->page_width,
            $this->page_height,
        ], self::UNICODE, 'UTF-8', self::DISK_CACHE);

        // Setup the PDF margins
        $this->pdf->SetMargins($this->left_margin, $this->top_margin, $this->right_margin);
        $this->pdf->setHeaderMargin($this->header_margin);
        $this->pdf->setFooterMargin($this->footer_margin);
        //Set auto page breaks
        $this->pdf->SetAutoPageBreak(true, $this->bottom_margin);
        // Set font subsetting
        $this->pdf->setFontSubsetting(self::SUBSETTING);
        // Setup PDF compression
        $this->pdf->SetCompression(self::COMPRESSION);
        // Setup RTL support
        $this->pdf->setRTL($this->rtl);
        // Set the document information
        $this->pdf->SetCreator(Webtrees::NAME . ' ' . Webtrees::VERSION);
        $this->pdf->SetAuthor($this->rauthor);
        $this->pdf->SetTitle($this->title);
        $this->pdf->SetSubject($this->rsubject);
        $this->pdf->SetKeywords($this->rkeywords);

        $this->pdf->setReport($this);

        if ($this->show_generated_by) {
            // The default style name for Generated by.... is 'genby'
            $element = new ReportPdfCell(0, 10, 0, 'C', '', 'genby', 1, ReportBaseElement::CURRENT_POSITION, ReportBaseElement::CURRENT_POSITION, 0, 0, '', '', true);
            $element->addText($this->generated_by);
            $element->setUrl(Webtrees::NAME . ' ' . Webtrees::VERSION);
            $this->pdf->addFooter($element);
        }
    }
public function setup ( ) : void { parent :: setup ( ) ; // Setup the PDF class with custom size pages because WT supports more page sizes. If WT sends an unknown size name then the default would be A4 $ this -> pdf = new ReportTcpdf ( $ this -> orientation , parent :: UNITS , [ $ this -> page_width , $ this -> page_height , ] , self :: UNICODE , 'UTF-8' , self :: DISK_CACHE ) ; // Setup the PDF margins $ this -> pdf -> SetMargins ( $ this -> left_margin , $ this -> top_margin , $ this -> right_margin ) ; $ this -> pdf -> setHeaderMargin ( $ this -> header_margin ) ; $ this -> pdf -> setFooterMargin ( $ this -> footer_margin ) ; //Set auto page breaks $ this -> pdf -> SetAutoPageBreak ( true , $ this -> bottom_margin ) ; // Set font subsetting $ this -> pdf -> setFontSubsetting ( self :: SUBSETTING ) ; // Setup PDF compression $ this -> pdf -> SetCompression ( self :: COMPRESSION ) ; // Setup RTL support $ this -> pdf -> setRTL ( $ this -> rtl ) ; // Set the document information $ this -> pdf -> SetCreator ( Webtrees :: NAME . ' ' . Webtrees :: VERSION ) ; $ this -> pdf -> SetAuthor ( $ this -> rauthor ) ; $ this -> pdf -> SetTitle ( $ this -> title ) ; $ this -> pdf -> SetSubject ( $ this -> rsubject ) ; $ this -> pdf -> SetKeywords ( $ this -> rkeywords ) ; $ this -> pdf -> setReport ( $ this ) ; if ( $ this -> show_generated_by ) { // The default style name for Generated by.... is 'genby' $ element = new ReportPdfCell ( 0 , 10 , 0 , 'C' , '' , 'genby' , 1 , ReportBaseElement :: CURRENT_POSITION , ReportBaseElement :: CURRENT_POSITION , 0 , 0 , '' , '' , true ) ; $ element -> addText ( $ this -> generated_by ) ; $ element -> setUrl ( Webtrees :: NAME . ' ' . Webtrees :: VERSION ) ; $ this -> pdf -> addFooter ( $ element ) ; } }
PDF Setup - ReportPdf

@return void
PDF Setup - ReportPdf