@@ -13,16 +13,16 @@ |
||
| 13 | 13 | |
| 14 | 14 | $date = time(); |
| 15 | 15 | for ($iRow=1; $iRow <= 100; $iRow++) {
|
| 16 | - // just a simple demo - most cases data comes from DB-query ;-) |
|
| 17 | - $row = array( |
|
| 18 | - 'text' => 'Text in var Col, Line ' . $iRow, |
|
| 19 | - 'weight' => (rand(10, 500) / 10), |
|
| 20 | - 'date' => date('Y-m-d', $date),
|
|
| 21 | - 'price' => (rand(10, 2000) / 9), |
|
| 22 | - 'grp_id' => rand(1, 4) |
|
| 23 | - ); |
|
| 24 | - $pdf->Row($row); |
|
| 25 | - $date += 24 * 60 * 60; |
|
| 16 | + // just a simple demo - most cases data comes from DB-query ;-) |
|
| 17 | + $row = array( |
|
| 18 | + 'text' => 'Text in var Col, Line ' . $iRow, |
|
| 19 | + 'weight' => (rand(10, 500) / 10), |
|
| 20 | + 'date' => date('Y-m-d', $date),
|
|
| 21 | + 'price' => (rand(10, 2000) / 9), |
|
| 22 | + 'grp_id' => rand(1, 4) |
|
| 23 | + ); |
|
| 24 | + $pdf->Row($row); |
|
| 25 | + $date += 24 * 60 * 60; |
|
| 26 | 26 | } |
| 27 | 27 | // ...and end of the grid |
| 28 | 28 | $pdf->EndGrid(); |
@@ -17,23 +17,23 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | class XPDFFont |
| 19 | 19 | {
|
| 20 | - /** @var string fontname */ |
|
| 21 | - public string $strFontname; |
|
| 22 | - /** @var int size */ |
|
| 23 | - public int $iSize; |
|
| 24 | - /** @var string style */ |
|
| 25 | - public string $strStyle; |
|
| 20 | + /** @var string fontname */ |
|
| 21 | + public string $strFontname; |
|
| 22 | + /** @var int size */ |
|
| 23 | + public int $iSize; |
|
| 24 | + /** @var string style */ |
|
| 25 | + public string $strStyle; |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Creates a Font-object |
|
| 29 | - * @param string $strFontname |
|
| 30 | - * @param string $strStyle 'B', 'I' or 'BI' |
|
| 31 | - * @param int $iSize |
|
| 32 | - */ |
|
| 33 | - function __construct(string $strFontname, string $strStyle, int $iSize) |
|
| 34 | - {
|
|
| 35 | - $this->strFontname = $strFontname; |
|
| 36 | - $this->strStyle = $strStyle; |
|
| 37 | - $this->iSize = $iSize; |
|
| 38 | - } |
|
| 27 | + /** |
|
| 28 | + * Creates a Font-object |
|
| 29 | + * @param string $strFontname |
|
| 30 | + * @param string $strStyle 'B', 'I' or 'BI' |
|
| 31 | + * @param int $iSize |
|
| 32 | + */ |
|
| 33 | + function __construct(string $strFontname, string $strStyle, int $iSize) |
|
| 34 | + {
|
|
| 35 | + $this->strFontname = $strFontname; |
|
| 36 | + $this->strStyle = $strStyle; |
|
| 37 | + $this->iSize = $iSize; |
|
| 38 | + } |
|
| 39 | 39 | } |