Ejemplo n.º 1
0
	}
}

$pdf->Ln();
if (!$blank && CSalePaySystemAction::GetParamValue('PATH_TO_STAMP'))
	$pdf->Image(CSalePaySystemAction::GetParamValue('PATH_TO_STAMP'), $margin['left']+40, $pdf->GetY());


$pdf->Line($pdf->GetX(), $pdf->GetY(), $pdf->GetX()+$width, $pdf->GetY());
$pdf->Ln();
$pdf->Ln();

$isAccSign = false;
if (!$blank && CSalePaySystemAction::GetParamValue('SELLER_ACC_SIGN'))
{
	list($signHeight, $signWidth) = $pdf->GetImageSize(CSalePaySystemAction::GetParamValue('SELLER_ACC_SIGN'));

	if ($signHeight && $signWidth)
	{
		$ratio = min(37.5/$signHeight, 150/$signWidth);
		$signHeight = $ratio * $signHeight;
		$signWidth  = $ratio * $signWidth;

		$isAccSign = true;
	}
}

$pdf->SetFont($fontFamily, 'B', $fontSize);
$pdf->Write(15, CSalePdf::prepareToPdf('Виписав(ла): '));

if ($isAccSign)
Ejemplo n.º 2
0
$pageHeight = $pdf->GetPageHeight();
$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);
$fontFamily = 'Font';
$fontSize = 10.5;
$margin = array('top' => intval(CSalePaySystemAction::GetParamValue('MARGIN_TOP', false) ?: 15) * 72 / 25.4, 'right' => intval(CSalePaySystemAction::GetParamValue('MARGIN_RIGHT', false) ?: 15) * 72 / 25.4, 'bottom' => intval(CSalePaySystemAction::GetParamValue('MARGIN_BOTTOM', false) ?: 15) * 72 / 25.4, 'left' => intval(CSalePaySystemAction::GetParamValue('MARGIN_LEFT', false) ?: 20) * 72 / 25.4);
$width = $pageWidth - $margin['left'] - $margin['right'];
$pdf->SetDisplayMode(100, 'continuous');
$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);
Ejemplo n.º 3
0
$pageHeight = $pdf->GetPageHeight();
$pdf->AddFont('Font', '', 'pt_sans-regular.ttf', true);
$pdf->AddFont('Font', 'B', 'pt_sans-bold.ttf', true);
$fontFamily = 'Font';
$fontSize = 10.5;
$margin = array('top' => intval(CSalePaySystemAction::GetParamValue('MARGIN_TOP', false) ?: 15) * 72 / 25.4, 'right' => intval(CSalePaySystemAction::GetParamValue('MARGIN_RIGHT', false) ?: 15) * 72 / 25.4, 'bottom' => intval(CSalePaySystemAction::GetParamValue('MARGIN_BOTTOM', false) ?: 15) * 72 / 25.4, 'left' => intval(CSalePaySystemAction::GetParamValue('MARGIN_LEFT', false) ?: 20) * 72 / 25.4);
$width = $pageWidth - $margin['left'] - $margin['right'];
$pdf->SetDisplayMode(100, 'continuous');
$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->SetFont($fontFamily, 'B', $fontSize);
$sellerName = CSalePaySystemAction::GetParamValue("SELLER_NAME", false);
if ($sellerName) {
    list($string, $text) = $pdf->splitString(CSalePdf::prepareToPdf($sellerName), $width - 10);
    $pdf->Cell($width, 15, $string, 0, 0, 'R');
    $pdf->Ln();
}
$sellerAddress = CSalePaySystemAction::GetParamValue("SELLER_ADDRESS", false);
if ($sellerAddress) {