コード例 #1
0
ファイル: ex1.php プロジェクト: skainz/PDF-CMYK-chooser
$posy = $min_y;
$size_x = 15;
$size_y = 10;
$step_x = $size_x + 0.2;
$step_y = $size_y + 0.2 + 3;
$ss = 2;
if ($_GET['s']) {
    $ss = intval($_GET['s']);
}
if ($ss < 1) {
    $ss = 1;
}
$pdf->SetFont('Arial', '', 12);
$pdf->Text($min_x + $size_x + 3, $label_y, "Bereich C:" . $c_s . "-" . $c_e . "/M:" . $m_s . "-" . $m_e . "/Y:" . $y_s . "-" . $y_e . "/K:" . $k_s . "-" . $k_e);
$pdf->SetTitle("Farbkarte " . "Bereich C:" . $c_s . "-" . $c_e . "/M:" . $m_s . "-" . $m_e . "/Y:" . $y_s . "-" . $y_e . "/K:" . $k_s . "-" . $k_e);
$pdf->Rect($min_x, $label_y - $size_y, $size_x, $size_y, 'F');
$ncl = $c - 5;
if ($ncl < 0) {
    $ncl = 0;
}
$ncu = $c + 5;
if ($ncu > 100) {
    $ncu = 100;
}
$pdf->SetFillColor(20, 0, 0, 0);
$pdf->Rect(120, $label_y - $size_y, 5, 5, 'F');
$link = $pdf->AddLink();
$pdf->Link(120, $label_y - $size_y, 5, 5, "http://" . $_SERVER["SERVER_NAME"] . "" . $_SERVER["SCRIPT_NAME"] . "?c=" . $ncl . "&m=" . $m . "&y=" . $y . "&k=" . $k . "&s=" . $ss);
$pdf->SetFillColor(100, 0, 0, 0);
$pdf->Rect(120, $label_y - $size_y + 5.2, 5, 5, 'F');
$pdf->Link(120, $label_y - $size_y + 5.2, 5, 5, "http://" . $_SERVER["SERVER_NAME"] . "" . $_SERVER["SCRIPT_NAME"] . "?c=" . $ncu . "&m=" . $m . "&y=" . $y . "&k=" . $k . "&s=" . $ss);
コード例 #2
0
ファイル: ex.php プロジェクト: rohmad-st/fpdf
<?php

require 'pdf-cmyk.php';
$pdf = new cmykPDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 20);
$pdf->SetLineWidth(1);
$pdf->SetDrawColor(50, 0, 0, 0);
$pdf->SetFillColor(100, 0, 0, 0);
$pdf->SetTextColor(100, 0, 0, 0);
$pdf->Rect(10, 10, 20, 20, 'DF');
$pdf->Text(10, 40, 'Cyan');
$pdf->SetDrawColor(0, 50, 0, 0);
$pdf->SetFillColor(0, 100, 0, 0);
$pdf->SetTextColor(0, 100, 0, 0);
$pdf->Rect(40, 10, 20, 20, 'DF');
$pdf->Text(40, 40, 'Magenta');
$pdf->SetDrawColor(0, 0, 50, 0);
$pdf->SetFillColor(0, 0, 100, 0);
$pdf->SetTextColor(0, 0, 100, 0);
$pdf->Rect(70, 10, 20, 20, 'DF');
$pdf->Text(70, 40, 'Yellow');
$pdf->SetDrawColor(0, 0, 0, 50);
$pdf->SetFillColor(0, 0, 0, 100);
$pdf->SetTextColor(0, 0, 0, 100);
$pdf->Rect(100, 10, 20, 20, 'DF');
$pdf->Text(100, 40, 'Black');
$pdf->SetDrawColor(128, 0, 0);
$pdf->SetFillColor(255, 0, 0);
$pdf->SetTextColor(255, 0, 0);
$pdf->Rect(10, 50, 20, 20, 'DF');