noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
PDFLand Class Reference

PDF in landscape mode. More...

+ Inheritance diagram for PDFLand:
+ Collaboration diagram for PDFLand:

Public Member Functions

 __construct ($p_cn=null, $orientation='L', $unit='mm', $format='A4')
 
 Footer ()
 
 Header ()
 
- Public Member Functions inherited from PDF
 __construct (Database $p_cn, $orientation='P', $unit='mm', $format='A4')
 
 get_tiers ($p_jr_id, $p_jrn_type)
 retrieve the client name and quick_code
 
 set_filter_operation ($filter_operation)
 
 setDossierInfo ($dossier="n/a")
 
- Public Member Functions inherited from PDF_Core
 __construct ( $orientation='P', $unit='mm', $format='A4')
 
 fill_row ($enable)
 set color for row ,
 
 get_margin_bottom ()
 
 get_margin_left ()
 
 get_margin_right ()
 
 get_margin_top ()
 
 get_orientation ()
 
 get_page_size ()
 
 get_unit ()
 
 is_fill ($p_step)
 If the step is even then return 1 and set the backgroup color to blue , otherwise returns 0, and set the background color to white It is use to compute alternated colored row , it the parameter fill in write_cell and cell.
 
 line_new ($p_step=null)
 Print all the cell stored and call Ln (new line)
 
 LongLine ($w, $h, $txt, $border=0, $align='', $fill=false)
 add a cell with automatic return to the line if the text is too long, deprecated , it calls only PDFCore::write_cell_
 
 write_cell ($width, $height=0, $txt='', $border=0, $interline=0, $align='', $fill=false, $link='')
 add a cell the text is not cut and don't return to this line if too large
 
 write_multi ($width, $interline, $txt, $border=0, $align='', $fill=false)
 add a cell with automatic return to the line if the text is too long
 

Additional Inherited Members

- Static Public Member Functions inherited from PDF
static test_me ()
 test the class
 
- Data Fields inherited from PDF
 $cn = null
 
 $date = ""
 
 $dossier = "n/a"
 
 $own = null
 
 $soc = ""
 
- Protected Member Functions inherited from PDF_Core
 add_cell (Cellule $Ce)
 
 check_page_add ()
 Check if a page must be added due a MultiCell.
 
 count_nb_row ($p_text, $p_colSize)
 Count the number of rows a p_text will take for a multicell.
 
 print_row ()
 print the current array of cell and reset it , if different colors are set on the same row you have to print it before changing
 
- Protected Attributes inherited from PDF_Core
 $bigger
 
 $cells =array()
 

Detailed Description

PDF in landscape mode.

Definition at line 33 of file pdf_land.class.php.

Constructor & Destructor Documentation

◆ __construct()

PDFLand::__construct ( $p_cn = null,
$orientation = 'L',
$unit = 'mm',
$format = 'A4' )

Definition at line 36 of file pdf_land.class.php.

37 {
38
39 if($p_cn == null) die("No database connection. Abort.");
40 $this->bigger=0;
41
42 parent::__construct($p_cn,'L', $unit, $format);
43 date_default_timezone_set ('Europe/Paris');
44 $this->AddFont('DejaVu','','DejaVuSans.ttf',true);
45 $this->AddFont('DejaVu','B','DejaVuSans-Bold.ttf',true);
46 $this->AddFont('DejaVu','BI','DejaVuSans-BoldOblique.ttf',true);
47 $this->AddFont('DejaVuCond','','DejaVuSansCondensed.ttf',true);
48 $this->AddFont('DejaVuCond','B','DejaVuSansCondensed-Bold.ttf',true);
49 $this->AddFont('DejaVuCond','I','DejaVuSansCondensed-Oblique.ttf',true);
50
51 $this->cn = $p_cn;
52 $this->own = new Noalyss_Parameter_Folder($this->cn);
53 $this->soc = $this->own->MY_NAME;
54 $this->date = date('d.m.Y');
55 }
$input_from cn

References cn.

Member Function Documentation

◆ Footer()

PDFLand::Footer ( )

Reimplemented from PDF.

Definition at line 65 of file pdf_land.class.php.

66 {
67 //Position at 2 cm from bottom
68 $this->SetY(-20);
69 //Arial italic 8
70 $this->SetFont('DejaVuCond', 'I', 8);
71 //Page number
72 $this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
73 $this->Ln(3);
74 // Created by NOALYSS
75 $this->Cell(0,8,'Created by NOALYSS, online on https://www.noalyss.eu',0,0,'C',false,'https://www.noalyss.eu');
76
77 }

◆ Header()

PDFLand::Header ( )

Reimplemented from PDF.

Definition at line 56 of file pdf_land.class.php.

57 {
58 //Arial bold 12
59 $this->SetFont('DejaVu', 'B', 10);
60 //Title
61 $this->Cell(0,10,$this->dossier, 'B', 0, 'C');
62 //Line break
63 $this->Ln(20);
64 }

The documentation for this class was generated from the following file: