32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-22 12:55:10 +00:00
This commit is contained in:
Nick 2011-10-07 20:06:32 +02:00
parent 7f1f40d691
commit 116f8b3a53
2 changed files with 21 additions and 16 deletions

View File

@ -27,6 +27,7 @@
* @since 2008-03-04 * @since 2008-03-04
*/ */
require_once('../config/lang/eng.php'); require_once('../config/lang/eng.php');
require_once('../tcpdf.php'); require_once('../tcpdf.php');
@ -102,12 +103,12 @@ $pdf->Ln(6);
// Gender // Gender
$pdf->Cell(35, 5, '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->ComboBox('gender', 30, 5, array(array('', '-'), array('M', 'Male'), array('F', 'Female')));
$pdf->Ln(6); $pdf->Ln(6);
// Drink // Drink
$pdf->Cell(35, 5, 'Drink:'); $pdf->Cell(35, 5, 'Drink:');
//$pdf->RadioButton('drink', 5, array('readonly' => 'true'), array(), 'Water');
$pdf->RadioButton('drink', 5, array(), array(), 'Water'); $pdf->RadioButton('drink', 5, array(), array(), 'Water');
$pdf->Cell(35, 5, 'Water'); $pdf->Cell(35, 5, 'Water');
$pdf->Ln(6); $pdf->Ln(6);
@ -118,28 +119,32 @@ $pdf->Ln(6);
$pdf->Cell(35, 5, ''); $pdf->Cell(35, 5, '');
$pdf->RadioButton('drink', 5, array(), array(), 'Wine'); $pdf->RadioButton('drink', 5, array(), array(), 'Wine');
$pdf->Cell(35, 5, '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); $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 // Listbox
$pdf->Cell(35, 5, 'List:'); $pdf->Cell(35, 5, 'List:');
$pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true')); $pdf->ListBox('listbox', 60, 15, array('', 'item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7'), array('multipleSelection'=>'true'));
$pdf->Ln(20); $pdf->Ln(20);
// Adress
$pdf->Cell(35, 5, 'Address:');
$pdf->TextField('address', 60, 18, array('multiline'=>true));
$pdf->Ln(19);
// E-mail // E-mail
$pdf->Cell(35, 5, 'E-mail:'); $pdf->Cell(35, 5, 'E-mail:');
$pdf->TextField('email', 50, 5); $pdf->TextField('email', 50, 5);
$pdf->Ln(6); $pdf->Ln(6);
// Newsletter
$pdf->Cell(35, 5, 'Newsletter:');
$pdf->CheckBox('newsletter', 5, true, array(), array(), 'OK');
$pdf->Ln(10);
// Date of the day // Date of the day
$pdf->Cell(35, 5, 'Date:'); $pdf->Cell(35, 5, 'Date:');
$pdf->TextField('date', 30, 5, array(), array('v'=>date('Y-m-d'), 'dv'=>date('Y-m-d'))); $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 // 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))); $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 // Form validation functions
$js = <<<EOD $js = <<<EOD
function CheckField(name,message) { function CheckField(name,message) {

View File

@ -16986,6 +16986,10 @@ class TCPDF {
} else { } else {
$defval = 'Off'; $defval = 'Off';
} }
// set font
$font = 'zapfdingbats';
$this->AddFont($font);
$tmpfont = $this->getFontBuffer($font);
// set data for parent group // set data for parent group
if (!isset($this->radiobutton_groups[$this->page])) { if (!isset($this->radiobutton_groups[$this->page])) {
$this->radiobutton_groups[$this->page] = array(); $this->radiobutton_groups[$this->page] = array();
@ -17006,10 +17010,7 @@ class TCPDF {
$prop['borderStyle'] = 'inset'; $prop['borderStyle'] = 'inset';
// get annotation data // get annotation data
$popt = $this->getAnnotOptFromJSProp($prop); $popt = $this->getAnnotOptFromJSProp($prop);
// set additional default values // set additional default options
$font = 'zapfdingbats';
$this->AddFont($font);
$tmpfont = $this->getFontBuffer($font);
$this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i']; $this->annotation_fonts[$tmpfont['fontkey']] = $tmpfont['i'];
$fontstyle = sprintf('/F%d %.2F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor); $fontstyle = sprintf('/F%d %.2F Tf %s', $tmpfont['i'], $this->FontSizePt, $this->TextColor);
$popt['da'] = $fontstyle; $popt['da'] = $fontstyle;