Пример #1
0
         // move to next page so family sheet banner won't be last on page
         // but if we are in first family in generation, the gen banner
         // is already checked so no need here
         $pdf->AddPage();
         $pdf->SetY(20);
     }
     $pdf->SetFont('Arial', 'BI', 12);
     $pdf->SetFillColor(186, 244, 193);
     $treetext = show_tree_text($dataDb->tree_prefix, $selected_language);
     $family_top = $treetext['family_top'];
     if ($family_top != '') {
         $pdf->SetLeftMargin(10);
         $pdf->Cell(0, 6, pdf_convert($family_top), 0, 1, 'L', true);
     } else {
         $pdf->SetLeftMargin(10);
         $pdf->Cell(0, 6, pdf_convert(__('Family group sheet')), 0, 1, 'L', true);
     }
     $pdf->SetFont('Arial', '', 12);
 } elseif ($screen_mode == 'RTF') {
     $sect->addEmptyParagraph($fontSmall, $parBlack);
     $rtf_text = $treetext['family_top'];
     if ($rtf_text != '') {
         $sect->writeText($rtf_text, $arial14, $parHead);
     } else {
         $sect->writeText(__('Family group sheet'), $arial14, $parHead);
     }
 } else {
     // *** Add tip in family screen ***
     if (!$bot_visit and $generateIndex == 0 and $parent1_marr == 0) {
         echo '<div class="print_version"><b>';
         printf(__('TIP: use %s for other (ancestor and descendant) reports.'), '<img src="images/reports.gif">');
Пример #2
0
         }
         if ($m < $end) {
             $pdf->SetLeftMargin($marg);
             $pdf->SetY($posy);
         }
     }
     $pdf->SetX($posx);
     $posy = $pdf->GetY();
 }
 //initialize pdf generation
 @($persDb = $db_functions->get_person($family_id));
 // *** Use person class ***
 $pers_cls = new person_cls();
 $pers_cls->construct($persDb);
 $name = $pers_cls->person_name($persDb);
 $title = pdf_convert(__('Ancestor sheet') . __(' of ') . $name["standard_name"]);
 $pdf = new PDF();
 $pdf->SetTitle($title);
 $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
 $pdf->SetTopMargin(4);
 $pdf->SetAutoPageBreak(false);
 //$pdf->SetLineWidth(3);
 //$pdf->AddPage();
 $pdf->AddPage("L");
 $pdf->SetLeftMargin(16);
 $pdf->SetRightMargin(16);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Ln(2);
 $name = $pers_cls->person_name($persDb);
 $pdf->MultiCell(0, 10, __('Ancestor sheet') . __(' of ') . $name["standard_name"], 0, 'C');
 $pdf->Ln(2);
Пример #3
0
 function Write($h, $txt, $link = '')
 {
     //Output text in flowing mode
     $txt = pdf_convert($txt);
     $cw =& $this->CurrentFont['cw'];
     $w = $this->w - $this->rMargin - $this->x;
     $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
     $s = str_replace("\r", '', $txt);
     $nb = strlen($s);
     $sep = -1;
     $i = 0;
     $j = 0;
     $l = 0;
     $nl = 1;
     while ($i < $nb) {
         //Get next character
         $c = $s[$i];
         if ($c == "\n") {
             //Explicit line break
             $this->Cell($w, $h, substr($s, $j, $i - $j), 0, 2, '', 0, $link);
             $i++;
             $sep = -1;
             $j = $i;
             $l = 0;
             if ($nl == 1) {
                 $this->x = $this->lMargin;
                 $w = $this->w - $this->rMargin - $this->x;
                 $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
             }
             $nl++;
             continue;
         }
         if ($c == ' ') {
             $sep = $i;
         }
         $l += $cw[$c];
         if ($l > $wmax) {
             //Automatic line break
             if ($sep == -1) {
                 if ($this->x > $this->lMargin) {
                     //Move to next line
                     $this->x = $this->lMargin;
                     $this->y += $h;
                     $w = $this->w - $this->rMargin - $this->x;
                     $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
                     $i++;
                     $nl++;
                     continue;
                 }
                 if ($i == $j) {
                     $i++;
                 }
                 $this->Cell($w, $h, substr($s, $j, $i - $j), 0, 2, '', 0, $link);
             } else {
                 $this->Cell($w, $h, substr($s, $j, $sep - $j), 0, 2, '', 0, $link);
                 $i = $sep + 1;
             }
             $sep = -1;
             $j = $i;
             $l = 0;
             if ($nl == 1) {
                 $this->x = $this->lMargin;
                 $w = $this->w - $this->rMargin - $this->x;
                 $wmax = ($w - 2 * $this->cMargin) * 1000 / $this->FontSize;
             }
             $nl++;
         } else {
             $i++;
         }
     }
     //Last chunk
     if ($i != $j) {
         $this->Cell($l / 1000 * $this->FontSize, $h, substr($s, $j), 0, 0, '', 0, $link);
     }
 }
Пример #4
0
if (isset($_GET["nr_generations"])) {
    $nr_generations = $_GET["nr_generations"];
}
if (isset($_POST["nr_generations"])) {
    $nr_generations = $_POST["nr_generations"];
}
if ($screen_mode == 'PDF') {
    //initialize pdf generation
    $pdfdetails = array();
    $pdf_marriage = array();
    @($persDb = $db_functions->get_person($main_person));
    // *** Use person class ***
    $pers_cls = new person_cls();
    $pers_cls->construct($persDb);
    $name = $pers_cls->person_name($persDb);
    $title = pdf_convert(__('Outline report') . __(' of ') . $name["standard_name"]);
    $pdf = new PDF();
    $pdf->SetTitle($title);
    $pdf->SetAuthor('Huub Mons (pdf: Yossi Beck)');
    if (isset($_POST["screen_mode"]) and $_POST["screen_mode"] == "PDF-L") {
        $pdf->AddPage("L");
    } else {
        $pdf->AddPage("P");
    }
    $pdf->SetFont('Arial', 'B', 15);
    $pdf->Ln(4);
    $pdf->MultiCell(0, 10, __('Outline report') . __(' of ') . $name["standard_name"], 0, 'C');
    $pdf->Ln(4);
    $pdf->SetFont('Arial', '', 12);
}
if ($screen_mode != "PDF") {