From 116f8b3a5347bd077ddaf47f136708a0771905dc Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 7 Oct 2011 20:06:32 +0200 Subject: [PATCH] 5.9.129 --- examples/example_014.php | 28 ++++++++++++++++------------ tcpdf.php | 9 +++++---- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/examples/example_014.php b/examples/example_014.php index 511aae5..c42d6f1 100755 --- a/examples/example_014.php +++ b/examples/example_014.php @@ -27,6 +27,7 @@ * @since 2008-03-04 */ + require_once('../config/lang/eng.php'); require_once('../tcpdf.php'); @@ -102,12 +103,12 @@ $pdf->Ln(6); // Gender $pdf->Cell(35, 5, 'Gender:'); -//$pdf->ComboBox('gender', 10, 5, array('', 'M', 'F')); $pdf->ComboBox('gender', 30, 5, array(array('', '-'), array('M', 'Male'), array('F', 'Female'))); $pdf->Ln(6); // Drink $pdf->Cell(35, 5, 'Drink:'); +//$pdf->RadioButton('drink', 5, array('readonly' => 'true'), array(), 'Water'); $pdf->RadioButton('drink', 5, array(), array(), 'Water'); $pdf->Cell(35, 5, 'Water'); $pdf->Ln(6); @@ -118,28 +119,32 @@ $pdf->Ln(6); $pdf->Cell(35, 5, ''); $pdf->RadioButton('drink', 5, array(), array(), 'Wine'); $pdf->Cell(35, 5, 'Wine'); +$pdf->Ln(6); +$pdf->Cell(35, 5, ''); +$pdf->RadioButton('drink', 5, array(), array(), 'Milk'); +$pdf->Cell(35, 5, 'Milk'); $pdf->Ln(10); +// Newsletter +$pdf->Cell(35, 5, 'Newsletter:'); +$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK'); + +$pdf->Ln(10); +// Adress +$pdf->Cell(35, 5, 'Address:'); +$pdf->TextField('address', 60, 18, array('multiline'=>true, 'lineWidth'=>0, 'borderStyle'=>'none'), array('v'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'dv'=>'Lorem ipsum dolor sit amet, consectetur adipiscing elit.')); +$pdf->Ln(19); + // Listbox $pdf->Cell(35, 5, 'List:'); $pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true')); $pdf->Ln(20); -// Adress -$pdf->Cell(35, 5, 'Address:'); -$pdf->TextField('address', 60, 18, array('multiline'=>true)); -$pdf->Ln(19); - // E-mail $pdf->Cell(35, 5, 'E-mail:'); $pdf->TextField('email', 50, 5); $pdf->Ln(6); -// Newsletter -$pdf->Cell(35, 5, 'Newsletter:'); -$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK'); -$pdf->Ln(10); - // Date of the day $pdf->Cell(35, 5, 'Date:'); $pdf->TextField('date', 30, 5, array(), array('v'=>date('Y-m-d'), 'dv'=>date('Y-m-d'))); @@ -156,7 +161,6 @@ $pdf->Button('reset', 30, 10, 'Reset', array('S'=>'ResetForm'), array('lineWidth // Submit Button $pdf->Button('submit', 30, 10, 'Submit', array('S'=>'SubmitForm', 'F'=>'http://localhost/printvars.php', 'Flags'=>array('ExportFormat')), array('lineWidth'=>2, 'borderStyle'=>'beveled', 'fillColor'=>array(128, 196, 255), 'strokeColor'=>array(64, 64, 64))); - // Form validation functions $js = <<AddFont($font); + $tmpfont = $this->getFontBuffer($font); // set data for parent group if (!isset($this->radiobutton_groups[$this->page])) { $this->radiobutton_groups[$this->page] = array(); @@ -17006,10 +17010,7 @@ class TCPDF { $prop['borderStyle'] = 'inset'; // get annotation data $popt = $this->getAnnotOptFromJSProp($prop); - // set additional default values - $font = 'zapfdingbats'; - $this->AddFont($font); - $tmpfont = $this->getFontBuffer($font); + // set additional default options $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; $fontstyle = sprintf('/F%d %.2F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); $popt['da'] = $fontstyle;