输出PDF的问题
<br><?PHP <br />$id=$_GET['number'];<br><br>$uploaddir = 'download/';<br>$Date = date("YmdHis");<br>$filenamepdf = $uploaddir."Label_print".$Date.".pdf";<br><br><br><br>require_once('tcpdf/config/lang/eng.php');<br>require_once('tcpdf/tcpdf.php');<br>include("conn.php");<br><br>$pdf = new TCPDF('L', 'mm', 'BUSINESS_CARD_JP', true, 'UTF-8', false);<br>$pdf->setPrintHeader(false);<br>$pdf->setPrintFooter(false);<br>$pdf->SetFont('arialunicid0', '', 10);<br>$pdf->SetMargins(1,1,2,false);<br>$pdf->setFooterMargin(1);<br>$pdf->SetAutoPageBreak( true, 1 );<br><br><br> $Sql_hkpdf = "SELECT * , group_concat(' ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , if(`quantity-purchased`> 1, '****' , ' ') ),group_concat(' ' , `order_id` , ' ') FROM ( select * from `sale_orders` order by `sku`) T WHERE `shipments` =0 AND `number` =$id GROUP BY `recipient-name` , `ship-address-1` ORDER BY length(group_concat( ' ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , ' ' )) DESC,`sku`";<br><br> <br> $Result = mysql_query($Sql_hkpdf);<br> <br><br> while($rs = mysql_fetch_array($Result) ){<br> <br>$ship_address=$rs['ship-address-1'].$rs['ship-address-2'].$rs['ship-address-3'];<br>$sku=$rs["group_concat(' ' , concat_ws( ' X ', `sku` , `quantity-purchased` ) , if(`quantity-purchased`> 1, '****' , ' ') )"];<br>$ship_postal_code="〒".$rs['ship-postal-code'];<br><br>$ship_city="日本 ".$rs['ship-state']." ".$rs['ship-city'];<br>$recipient_name=$rs['recipient-name']." 樣";<br>$buyer_phone_number="電話番號:".$rs['buyer-phone-number'];<br>//$hkdizhi='From : Unit A1 , 7/F,Cheung Kong Factory Bldg , 6 Cheung Yee Street , Lai Chi Kok , Hong Kong';<br>$pdf->AddPage();<br>$pdf->SetFont('arialunicid0', '', 8);<br>$pdf->Write(0, $sku, '', 0, 'R', true, 0, false, false, 0);<br>$yy=$pdf->GetY();<br>$xx=$pdf->GetX();<br>$style = array('width' => 0.2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0));<br>$pdf->Line(2, $yy+0.3, 89, $yy+0.3, $style);<br>$pdf->SetFont('arialunicid0', '', 10);<br>$pdf->Write(0, $ship_postal_code, '', 0, 'L', true, 0, false, false, 0);<br>$pdf->Write(0, "\n", '', 0, 'L', true, 0, false, false, 0);<br>$pdf->Write(0, $ship_city, '', 0, 'L', true, 0, false, false, 0);<br>$pdf->Write(0, $ship_address, '', 0, 'L', true, 0, false, false, 0);<br>$pdf->Write(0, "\n", '', 0, 'L', true, 0, false, false, 0);<br>$pdf->SetFont('arialunicid0', '', 12);<br>$pdf->Write(0, $recipient_name, '', 0, 'C', true, 0, false, false, 0);<br>$pdf->SetFont('arialunicid0', '', 10);<br>$pdf->Write(0, $buyer_phone_number, '', 0, 'C', true, 0, false, false, 0);<div class="clear"> </div>