41 {
42 $nb_attribut = count($this->card->attribut);
43
44
45
46 if ($nb_attribut == 0) {
47 throw new \Exception(_("card_pdf.044 , card_inexistante"));
48 }
49 $this->setTitle($this->card->get_quick_code()." ".strtoupper($this->card->strAttribut(1))
50 ." ".$this->card->strAttribut(32,0), true);
51 $this->SetAuthor('NOALYSS');
52 $this->AliasNbPages();
53 $this->AddPage();
54
55 $this->setFont("DejaVu", '', 7);
56 $this->SetDrawColor(214, 209, 209);
57 for (
$i=0;
$i<$nb_attribut;
$i++)
58 {
59 $border="B";
60 $this->
write_cell(60,5,$this->card->attribut[
$i]->ad_text,$border);
61 $this->
write_cell(100,5,$this->card->attribut[
$i]->av_text,$border);
63 }
64
65
66 $filename=$this->card->strAttribut(1)."-".$this->card->strAttribut(23).".pdf";
68 $this->Output($filename,"D");
69 }
sanitize_filename($filename)
removed invalid character when computing a filename, the suffix is kept
line_new($p_step=null)
Print all the cell stored and call Ln (new line)
write_cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')