N°3912 - Polishing: Export - export of impact analysis

This commit is contained in:
acognet
2021-06-21 09:21:48 +02:00
parent 108bc2fa1d
commit ee5847ec82
5 changed files with 255 additions and 107 deletions

View File

@@ -67,10 +67,10 @@ class PDFPage extends WebPage
table {
padding: 2pt;
}
table.listResults td {
table.ibo-datatable td {
border: 0.5pt solid #000 ;
}
table.listResults th {
table.ibo-datatable th {
background-color: #eee;
border: 0.5pt solid #000 ;
}
@@ -86,6 +86,13 @@ table.section td {
td.icon {
width: 30px;
}
h2{
font-size: 10pt;
vertical-align: middle;
background-color:#eee;
padding: 2pt;
margin:2pt;
}
EOF
);
}

View File

@@ -39,6 +39,32 @@ class iTopPDF extends TCPDF
$this->sDocumentTitle = $sDocumentTitle;
}
/**
* Add image
*
* @param string $sImagePath Name of the SVG file or a '@' character followed by the SVG data string.
* @param $x (float) Abscissa of the upper-left corner.
* @param $y (float) Ordinate of the upper-left corner.
* @param $w (float) Width of the image in the page. If not specified or equal to zero, it is automatically calculated.
* @param $h (float) Height of the image in the page. If not specified or equal to zero, it is automatically calculated.
*/
public function AddImage($sImagePath, $x = '', $y = '', $w = 0, $h = 0)
{
/*if (endsWith(strtolower($sImagePath), ".svg")) {
$this->ImageSVG($sImagePath, $x, $y, $w, $h);
} else {
$this->Image($sImagePath, $x, $y, $w, $h);
}*/
$imgtype = TCPDF_IMAGES::getImageFileType($sImagePath);
if (($imgtype == 'eps') or ($imgtype == 'ai')) {
$this->ImageEps($sImagePath, $x, $y, $w, $h);;
} elseif ($imgtype == 'svg') {
$this->ImageSVG($sImagePath, $x, $y, $w, $h);;
} else {
$this->Image($sImagePath, $x, $y, $w, $h);;
}
}
/**
* Builds the custom header. Called for each new page.
*