mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
pdf diagnostic
This commit is contained in:
parent
4e56f6751a
commit
b8d03e98c3
@ -124,7 +124,10 @@ class Diagnostics
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$textPdf = '<a href="index.php?sec=gextensions&sec2='.$this->ajaxController.'">';
|
$urlPdf = ui_get_full_url(false, false, false, false);
|
||||||
|
$urlPdf .= 'enterprise/operation/reporting/reporting_viewer_pdf.php';
|
||||||
|
$textPdf = '<a href="'.$urlPdf.'" target="_new">';
|
||||||
|
|
||||||
$textPdf .= html_print_image(
|
$textPdf .= html_print_image(
|
||||||
'images/pdf.png',
|
'images/pdf.png',
|
||||||
true,
|
true,
|
||||||
@ -1639,28 +1642,16 @@ class Diagnostics
|
|||||||
*/
|
*/
|
||||||
public function exportPDF()
|
public function exportPDF()
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
// TODO: TO BE CONTINUED.
|
// TODO: TO BE CONTINUED.
|
||||||
$pdf = new PDFTranslator();
|
enterprise_include_once('/include/class/Pdf.class.php');
|
||||||
|
$pdf = new Pdf([]);
|
||||||
// Set font from font defined in report.
|
$pdf->setMetadata('el titulo', 'daniel', 'pepe', 'el sujeto');
|
||||||
$pdf->custom_font = $report['custom_font'];
|
$pdf->setHeaderHTML('esto es el codigo html del header');
|
||||||
|
$pdf->writeHTML('esto es el html del contenido');
|
||||||
$product_name = io_safe_output(get_product_name());
|
$pdf->setFooterHTML('esto es el footer');
|
||||||
$pdf->setMetadata(
|
$pdf->writePDFfile();
|
||||||
__('Diagnostics Info'),
|
|
||||||
$product_name.' Enteprise',
|
|
||||||
$product_name,
|
|
||||||
__('Automated %s report for user defined report', $product_name)
|
|
||||||
);
|
|
||||||
|
|
||||||
$filename = '';
|
|
||||||
|
|
||||||
if ($filename !== '') {
|
|
||||||
$pdfObject->writePDFfile($filename);
|
|
||||||
} else {
|
|
||||||
$pdfObject->showPDF();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user