Exemplo n.º 1
0
/*--------------------------------------------------------------------------
 * PDF Template Include
 *------------------------------------------------------------------------*/
$pdf_template = "./templates/est_template.php";
include_once $pdf_template;
/*--------------------------------------------------------------------------
 * PDF 파일 생성
 *------------------------------------------------------------------------*/
//... 기정 폰트
$defFont = 'Tahoma';
$pdf = new PDFTable();
/*
$pdf->AddFont($defFont,'','malgun.ttf',true);
$pdf->AddFont('malgunbd','','malgunbd.ttf',true);
*/
$pdf->SetCreator("DigitalEMC");
$pdf->SetAuthor($company['CR_COMP_ECEO']);
$pdf->SetTitle("Quotation/Invoice Form");
$pdf->SetSubject($estinfo["CR_ESTM_SEQ"]);
$pdf->SetMargins(10, 10);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetTextColor(0, 0, 0);
$pdf->AddPage();
$pdf->Image($homedir . 'data' . $company['CR_COMP_E_LOGO'], 10, 6, 30);
$pdf->SetFont($defFont, '', 15);
$pdf->Cell(180, 10, $company['CR_COMP_E_TAGLINE'], 0, 0, 'R');
$pdf->Ln(20);
$pdf->SetFont('malgunbd', '', 24);
$title_width = 180;
$pdf->SetX((210 - $title_width) / 2);
$pdf->SetLineWidth(0.4);
Exemplo n.º 2
0
	$pdf->AddFont($defFont.'B','','SIMSUNB.TTF',true);
	*/
	//...China(GBK)
	/*
	$pdf->AddFont($defFont,'','MINGLIU.TTF',true);
	$pdf->AddFont($defFont.'B','','MINGLIUB.TTF',true);
	*/
	//...English
	
	$pdf->AddFont($defFont,'','ARIALUNI.TTF',true);
	//...$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
	$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
	
	
	
	$pdf->SetCreator("Hotel");
	$pdf->SetAuthor("Hotel");
	$pdf->SetTitle("Hotel");
	$pdf->SetSubject("Hotel", true);
	
	$pdf->SetMargins(10,2);
	$pdf->SetDrawColor(0,0,0);
	$pdf->SetTextColor(0,0,0);
	$pdf->SetPadding(0);
	$pdf->SetSpacing(0,0);

	$pdf->AddPage();
	$pdf->SetFont($defFont,'',20);
		
	$pdf->Image("../../themes/default/img/logo.png",135,10,60);	
	$pdf->htmltable("<table width=190>
 public function printPDF($booking_info)
 {
     require_once _TAS_TOOL_DIR_ . "/tfpdf/pdftable.inc.php";
     $title = "Voucher";
     $defFont = 'MyFont';
     $pdf = new PDFTable();
     /*switch (self::$cookie->LanguageID) {
     		case 1: 
     			//...English
     		*/
     $pdf->AddFont($defFont, '', 'ARIALUNI.TTF', true);
     //...$pdf->AddFont($defFont.'B','','ARIALUNI.TTF',true);
     $pdf->AddFont($defFont . 'B', '', 'ARIALUNI.TTF', true);
     /*break;
     		case 2: 
     			//...China(GB2312)
     			$pdf->AddFont($defFont,'','SIMSUN.TTF',true);
     			$pdf->AddFont($defFont.'B','','SIMSUNB.TTF',true);
     			break;
     		case 3:
     			//...China(GBK)
     			$pdf->AddFont($defFont,'','MINGLIU.TTF',true);
     			$pdf->AddFont($defFont.'B','','MINGLIUB.TTF',true);
     			break;
     		case 4:
     			//...Japan
     			$pdf->AddFont($defFont,'','MSGOTHIC.TTF',true);
     			$pdf->AddFont($defFont.'B','','MSGOTHICB.TTF',true);
     			break;
     		};*/
     $pdf->SetCreator("Hotel");
     $pdf->SetAuthor("Hotel");
     $pdf->SetTitle("Hotel");
     $pdf->SetSubject("Hotel", true);
     $pdf->SetMargins(10, 2, 0, 20);
     $pdf->SetDrawColor(0, 0, 0);
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetPadding(0);
     $pdf->SetSpacing(0, 0);
     $pdf->AddPage();
     $pdf->SetFont($defFont, '', 20);
     $pdf->SetHeaderFooter("header", "footer");
     $pdf->Ln(3);
     $pdf->SetFont($defFont, '', 10, true);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Hotel: {$booking_info['hotel_info']['HotelName']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(-2);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Address: {$booking_info['hotel_info']['HotelAddress']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(-2);
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t\t\t\t<tr><td size=12>Hotel Contact No: {$booking_info['hotel_info']['HotelContactNo']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(5);
     $pdf->SetFont($defFont, '', 8, true);
     $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>1.</td><td colspan=2 size=10 font-weight:bold>Customer Information(お客様情報)</td></tr>    \t\t    \t\t\r\n\t\t\t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Booking ID(予約番号): {$booking_info['BookingNo']}</td>\t\t\t\t<td>Guest Name(お客様 氏名): {$booking_info['contact_name']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>E-mail: {$booking_info['contact_email']}</td>\t\t\t\t<td>Tel: {$booking_info['contact_tel']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(3);
     $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>2. </td><td colspan=2 size=10 family={$defFont}B>Booking Information(予約情報)</td></tr>\r\n\t\t\t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Check In : {$booking_info['checkin']}</td>\t\t\t\t<td>Check Out : {$booking_info['checkout']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td colspan=2>Total No or rooms:  {$booking_info['roomString']}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(3);
     $pdf->htmltable("\r\n\t\t<table  width=190>\r\n\t\t        <tr><td width=5></td><td size=10 family={$defFont}B>Rooming Details(宿泊情報)</td></tr>\r\n\t\t    </table>");
     $i = 0;
     foreach ($booking_info['booked_roomplan_list'] as $roomplan) {
         $i++;
         $customer_count = count($roomplan['customer_info_list']);
         $customer_names = "";
         foreach ($roomplan['customer_info_list'] as $customer) {
             if ($customer_names != "") {
                 $customer_names .= " ,  ";
             }
             $customer_names .= ($customer['customer_sex'] == 1 ? "Mr " : "Mrs ") . $customer['customer_fnames'] . " " . $customer['customer_gnames'] . " (" . $customer['customer_country_name'] . ")";
         }
         $breakfast = $roomplan['Breakfast'] == 1 ? "Included" : "None";
         $Dinner = $roomplan['Dinner'] == 1 ? "Included" : "None";
         $special = "";
         if ($roomplan['req_nonsmoking'] == 1) {
             $special .= "Non Smoking, ";
         }
         if ($roomplan['req_smoking'] == 1) {
             $special .= "Smoking, ";
         }
         if ($roomplan['req_adjoin'] == 1) {
             $special .= "Adjoin room, ";
         }
         $special .= $roomplan['req_remark'];
         $pdf->htmltable("\r\n\t    \t<table  width=190>\r\n\t    \t\t<tr><td width=5></td><td size=8 family={$defFont}B>- Room {$i}</td></tr>\r\n\t    \t\t<tr><td width=5></td><td>Room Plan(宿泊プラン): {$roomplan['RoomPlanName']}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Room Type(ルームタイプ): {$roomplan['RoomTypeName']}</td>\t\t\t\t<td>no of pax stay at room: {$customer_count}</td></tr> \r\n\t\t\t</table>");
         $pdf->htmltable("\r\n\t\t\t<table width=190>\r\n\t\t\t\t<tr><td width=5></td><td>Guest Name(宿泊者名): {$customer_names}</td></tr>\r\n\t\t\t</table>\r\n\t\t");
         $pdf->htmltable("\r\n\t\t\t<table width=190>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Breakfast(朝食): {$breakfast}</td>\t\t\t<td>Dinner(夕食): {$Dinner}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td colspan=2>Special Request(特別リクエスト): {$special}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td size=8>* All Special request are subjects to availability</td></tr>\r\n\t\t\t</table>");
         $pdf->Ln(2);
         if ($i % 4 == 0) {
             $pdf->AddPage();
         }
     }
     $pdf->htmltable("\r\n\t    \t<table width=190>\r\n\t    \t\t<tr><td size=10 family={$defFont}B>3.</td><td colspan=2 size=10 family={$defFont}B>Agent Information(旅行会社情報)</td></tr>\r\n\t    \t\t<tr><td size=3></td>\r\n\t\t\t\t<tr><td width=5></td><td>Name: {$booking_info['agent_info']->Name}</td></tr>\r\n\t\t\t\t<tr><td width=5></td><td width=80>Phone no:  {$booking_info['agent_info']->Tel}</td>\t\t\t\t<td>Email: {$booking_info['agent_info']->Email}</td></tr>\r\n\t\t\t</table>");
     $pdf->Ln(2);
     $pdf->htmltable("<table width=190><tr><td> Note: <br>\r\n\t\t\t-This voucher must be presented during check in. Failure to do so may result in the reservation not being honored.<br> \r\n\t\t\t-Hotel has right a right to request credit card or deposit upon arrival to cover and guaranteed any incidental cost that maybe incurred during the stay.<br>\r\n\t\t\t-If you expect to arrive after 21:00, please inform the hotel your arrival time to avoid being released. In the event of No show or Early check-out, the hotel reserves right to charge a full cancellation fee.<br> \r\n\t\t\t-In case where Breakfast is included with the room rate, please note that certain hotels may charge extra for children travelling with their parents. If applicable, the hotel will bill you directly. Upon arrival, if you have any question, please verify with hotel.<br>\r\n\t\t</td></tr></table>");
     $pdf->Output("voucher.pdf", "D");
 }