$pdf->SetMargins($margin['left'], $margin['top'], $margin['right']); $pdf->SetAutoPageBreak(true, $margin['bottom']); $pdf->AddPage(); $y0 = $pdf->GetY(); $logoHeight = 0; $logoWidth = 0; if (CSalePaySystemAction::GetParamValue('PATH_TO_LOGO', false)) { list($imageHeight, $imageWidth) = $pdf->GetImageSize(CSalePaySystemAction::GetParamValue('PATH_TO_LOGO', false)); $imgDpi = intval(CSalePaySystemAction::GetParamValue('LOGO_DPI', false)) ?: 96; $imgZoom = 96 / $imgDpi; $logoHeight = $imageHeight * $imgZoom + 5; $logoWidth = $imageWidth * $imgZoom + 5; $pdf->Image(CSalePaySystemAction::GetParamValue('PATH_TO_LOGO', false), $pdf->GetX(), $pdf->GetY(), -$imgDpi, -$imgDpi); } $pdf->Ln(10); $pdf->SetFont($fontFamily, 'B', $fontSize * 3); $pdf->SetX($pdf->GetX() + $logoWidth); $pdf->MultiCell(0, 30, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME", false)), 0, 'L'); $pdf->Ln(); $pdf->SetY(max($y0 + $logoHeight, $pdf->GetY())); $pdf->Ln(10); $pdf->SetFont($fontFamily, 'B', $fontSize - 2); $seller = CSalePaySystemAction::GetParamValue("SELLER_NAME", false); if (CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false)) { $seller .= ' - '; $seller .= CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false); $seller .= ' '; } $seller = CSalePdf::prepareToPdf($seller); $pdf->Cell($pdf->GetStringWidth($seller), 10, $seller, 'B'); $pdf->Ln();