Skip to content
Snippets Groups Projects
Commit a9ca661f authored by Pegane Nestor's avatar Pegane Nestor
Browse files

FIX #8113 pdf displayed with original pdf dimensions

parent 04eeaea0
No related branches found
No related tags found
No related merge requests found
......@@ -138,8 +138,15 @@ if ($watermarkTab['text_color'] == '') {
$color = $colorDefault;
}
}
// Get original PDF File size
$pdf = new FPDI('P','pt');
$pdf->setSourceFile($filePathOnTmp);
$tplidx = $pdf->ImportPage(1);
$size = $pdf->getTemplateSize($tplidx);
// Create a PDF object and set up the properties
$pdf = new PDF("p", "pt", "A4");
$pdf = new PDF("p", "pt", array($size['h'],$size['w']));
$pdf->SetAuthor("MAARCH");
$pdf->SetTitle("MAARCH document");
$pdf->SetTextColor($color['color1'],$color['color2'],$color['color3']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment