예제 #1
0
파일: pdf.php 프로젝트: DarneoStudio/bitrix
$pdf->SetFont($fontFamily, 'B', $fontSize);
$pdf->SetX($pdf->GetX() + $logoWidth);
$pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME")));
$pdf->Ln();
if (CSalePaySystemAction::GetParamValue("SELLER_ADDRESS")) {
    $pdf->SetX($pdf->GetX() + $logoWidth);
    $pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_ADDRESS")));
    $pdf->Ln();
}
if (CSalePaySystemAction::GetParamValue("SELLER_PHONE")) {
    $pdf->SetX($pdf->GetX() + $logoWidth);
    $pdf->Write(15, CSalePdf::prepareToPdf(sprintf("Tel.: %s", CSalePaySystemAction::GetParamValue("SELLER_PHONE"))));
    $pdf->Ln();
}
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize * 2);
$pdf->Cell(0, 15, CSalePdf::prepareToPdf('Invoice'), 0, 0, 'C');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME")) {
    $pdf->Write(15, CSalePdf::prepareToPdf('To'));
}
$pdf->SetFont($fontFamily, '', $fontSize);
$invoiceNo = CSalePdf::prepareToPdf($GLOBALS["SALE_INPUT_PARAMS"]["ORDER"]["ACCOUNT_NUMBER"]);
$invoiceNoWidth = $pdf->GetStringWidth($invoiceNo);
$invoiceDate = CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("DATE_INSERT"));
$invoiceDateWidth = $pdf->GetStringWidth($invoiceDate);
예제 #2
0
파일: pdf.php 프로젝트: DarneoStudio/bitrix
$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();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME", false)) {
예제 #3
0
파일: pdf.php 프로젝트: DarneoStudio/bitrix
$y0 = $pdf->GetY();
$logoHeight = 0;
$logoWidth = 0;
if (CSalePaySystemAction::GetParamValue('PATH_TO_LOGO')) {
    list($imageHeight, $imageWidth) = $pdf->GetImageSize(CSalePaySystemAction::GetParamValue('PATH_TO_LOGO'));
    $logoHeight = $imageHeight + 5;
    $logoWidth = $imageWidth + 5;
    $pdf->Image(CSalePaySystemAction::GetParamValue('PATH_TO_LOGO'), $pdf->GetX(), $pdf->GetY());
}
$pdf->Ln(15);
$pdf->SetX($pdf->GetX() + $logoWidth);
$pdf->Write(15, CSalePdf::prepareToPdf(CSalePaySystemAction::GetParamValue("SELLER_NAME")));
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetY(max($y0 + $logoHeight, $pdf->GetY()));
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize - 2);
$seller = CSalePaySystemAction::GetParamValue("SELLER_NAME");
if (CSalePaySystemAction::GetParamValue("SELLER_ADDRESS")) {
    $seller .= ' – ';
    $seller .= CSalePaySystemAction::GetParamValue("SELLER_ADDRESS");
    $seller .= '  ';
}
$seller = CSalePdf::prepareToPdf($seller);
$pdf->Cell($pdf->GetStringWidth($seller), 10, $seller, 'B');
$pdf->Ln();
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($fontFamily, 'B', $fontSize);
if (CSalePaySystemAction::GetParamValue("BUYER_NAME")) {