|
|
|
รบกวนหน่อยค่ะ TCPDF หน้าที่2หรือแผ่นที่ข้อมูลมันทับกัน ต้องทำยังไงให้มันเรียงกันเหมือนแบบแผ่นแรกคะ |
|
|
|
|
|
|
|
รบกวนหน่อยค่ะ TCPDF หน้าที่2หรือแผ่นที่ข้อมูลมันทับกัน ต้องทำยังไงให้มันเรียงกันเหมือนแบบแผ่นแรกคะ
Code (PHP)
while($item = odbc_fetch_array($query)){
$num = count($item['MATNR']);
$x = $it%5;
if($x==0){
$pdf->Ln();
}
for( $i=1; $i<=$num; $i++ ){
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('thsarabun', 'B', 16);
$pdf->MultiCell(55, 30, 'Meterial : '.$item['MATNR'].' '.'Location : '.$item['LGORT'].' '.'Reservation : '.$item['RSNUM'].' '.'Batch No. : '.$item['CHARG'], 1, 'L', 1, 0, '', '', true);
}
if($x==5){
$pdf->Ln();
}$it++;
}
Tag : PHP, Ms SQL Server 2008, PDF, Google Chrome, XAMPP, Windows
|
ประวัติการแก้ไข 2019-07-17 11:39:15
|
|
|
|
|
Date :
2019-07-17 11:38:31 |
By :
mewhappy |
View :
1765 |
Reply :
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 5 เขียนโดย : Manussawin เมื่อวันที่ 2019-07-19 08:43:05
รายละเอียดของการตอบ ::
ถ้าเอาทั้งหน้ามีเท่านี้ค่ะ แต่คิดว่าน่าจะเกิดจากการfor หรือเปล่าเพราะลองเอาใส่ข้อมูลแบบเดี่ยวๆนอกfor ข้อมูลมันก็ยาวลงมาปกติ
ติดปัญหาเพราะไม่รู้จะแก้ยังไงค่ะ รบกวนหน่อยนะคะQ_Q
Code (PHP)
<?php
ob_start();
/*$user = 'sa';
$pass = 'x5152535490';
$server = '192.168.0.120';
$database = 'Reservation';
$connection_string = "DRIVER={SQL Server};SERVER=$server;DATABASE=$database;Client_CSet=UTF-8;";
$link = odbc_connect($connection_string,$user,$pass);
if ($link) {
// echo "Connection established.";
} else{
die("Connection could not be established.");
}*/
?>
<?php
// Include the main TCPDF library (search for installation path).
require_once('./lang/eng.php');
require_once('tcpdf_include.php');
/*class MYPDF extends TCPDF {
// Page footer
public function Footer() {
$this->SetY(10);
$this->SetFont('thsarabun', 'I', 14);
$this->Cell(290, 20, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'R', 0, '', 0, false, 'T', 'M');
// Position at 15 mm from bottom
$this->SetY(-40);
// Set font
$this->SetFont('thsarabun', '', 14);
// Page number
$this->Cell(250, 15, 'หน่วยงาน ', 0, false, 'R', 0, '', 0, false);
$this->Ln(5);
$this->Cell(0, 20, 'ผู้อนุมัติ '.'________________________', 0, false, 'R', 0, 0, false);
$this->Ln(7);
$this->Cell(0, 25, '(________________________)', 0, false, 'R', 0, 0, false);
}
} */
//$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// set some language-dependent strings (optional)
if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {
require_once(dirname(__FILE__).'/lang/eng.php');
$pdf->setLanguageArray($l);
}
// ---------------------------------------------------------
$pdf->SetFont('thsarabun', 'B', 18);
$pdf->SetFillColor(255, 255, 255);
$pdf->AddPage('L', 'A4');
// -----------------------------------------------------------------------------
$pdf->Text(50,16 ,$_GET['Plant']);
$pdf->Text(85, 16 , $_GET['location']);
$pdf->Ln(2);
/*$time = date("Y-m-d H:i:s");
$date = date("d/m/Y",strtotime($time)) ;
$sql = "select * From t_stock where DATE = '$date' ";
$query = odbc_exec ($link,$sql);
$it = 0;
while($item = odbc_fetch_array($query)){
$num = count($item['MATNR']);*/
$it = 0;
$num = count($_POST['MATNR']);
for($i = 0; $i <= $num; $i++){
$MATNR = $_POST['MATNR'][$i];
$RSNUM = $_POST['RSNUM'][$i];
$CHARG = $_POST['CHARG'][$i];
$LGORT = $_POST['LGORT'][$i];
$x = $it%5;
if($x==0){ $pdf->Ln(); }
//$pdf->writeHTMLCell(80, '', '', $y, $MATNR, 1, 0, 1, true, 'J', true);
//$pdf->Cell(0, 15, 'Meterial : '.$MATNR, 0, false, 'L', 0, '', 0, false);
//$test = 'testtesttesttesttesttesttesttesttesttesttesttesttest';
//$pdf->MultiCell(55, 30,$test, 1, 'L', 1, 0, '', '', true);
$pdf->MultiCell(55, 30,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if($x==5){ $pdf->Ln(); }
$it++;
}
$pdf->Output();
|
ประวัติการแก้ไข 2019-07-19 08:53:53
|
|
|
|
Date :
2019-07-19 08:47:36 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
$pdf->Ln(2);
เอาไปใส่ในลูป for ครับเป็นการกำหนดขึ้นแถวใหม่
|
|
|
|
|
Date :
2019-07-19 10:19:33 |
By :
Manussawin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($x==5){ $pdf->Ln(); } $x ไม่มีโอกาสเป็น 5 เป็นได้แค่ 0 - 4
แต่ใช้กลุ่มคำสั่งแบบนี้ดี ชัดเจนกว่า
Code (PHP)
$w = 50, $h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
for($i=0......){
$pdf->multiCell($w, $h, "abcd", currentBorders, alignment, false);
if( ($i % 5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
$current_y = $pdf->GetY(); // คืนค่าให้กับค่า current_y เมื่อเลยหน้า
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
}
|
ประวัติการแก้ไข 2019-07-19 11:16:35 2019-07-19 11:17:56 2019-07-19 11:22:28 2019-07-19 11:25:02 2019-07-19 11:27:49 2019-07-19 11:33:41
|
|
|
|
Date :
2019-07-19 11:01:28 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 8 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-19 11:01:28
รายละเอียดของการตอบ ::
ลองเอาcodeไปใส่แล้วค่ะยังเหมือนเดิมได้แบบนี้ค่ะ
Code (PHP)
$w = 50;
$h = 30;
$num = count($_POST['MATNR']);
for($i = 0; $i <= $num; $i++){
$current_y = $pdf->GetY();
$current_x = $pdf->GetX();
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY(0, $current_y + $h);
}else{
$pdf->SetXY($current_x + $w, $current_y);
}
}
|
|
|
|
|
Date :
2019-07-19 11:40:06 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดูโค๊ดผมใหม่อีกทีครับ มีการแก้ไข เขียนแบบไม่ได้ทดสอบ พอเอ๊ะ ก็แก้ไขให้ที 5555
|
|
|
|
|
Date :
2019-07-19 11:53:11 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 11 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-19 11:53:11
รายละเอียดของการตอบ ::
เหมือนเดิมเลยค่ะ ไม่มีอะไรเปลี่ยนเลย
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
for($i = 0; $i <= $num; $i++){
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
$current_y = $pdf->GetY(); // คืนค่าให้กับค่า current_y เมื่อเลยหน้า
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
}
|
|
|
|
|
Date :
2019-07-19 13:09:03 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
คงต้อง log ลง file แล้วล่ะครับว่า ค่า $current_y มันเปลี่ยนค่าบ้างหรือเปล่า
|
|
|
|
|
Date :
2019-07-19 14:19:28 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
for($i = 0; $i <= $num; $i++){
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
$current_y = $pdf->GetY(); // คืนค่าให้กับค่า current_y เมื่อเลยหน้า
fwrite($f, print_r(['line'=>__LINE__, 'i'=>$i, 'i % 5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y],true));
}else{
$pdf->SetXY($current_x += $w, $current_y);
fwrite($f, print_r(['line'=>__LINE__, 'i'=>$i, 'i % 5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y],true));
}
}
fclose($f);
|
|
|
|
|
Date :
2019-07-19 15:54:07 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองแบบที่ละส่วนดูว่า มันเออเร่อร์ ตรงไหน
$ar=['line'=> __LINE__ , 'i'=>$i, 'i % 5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y];
เปลี่ยนสีแดงหน่อยเผลอไปหน่อย
Code (PHP)
// เปลี่ยน array เป็น รูปแบบเก่าด้วย php version อาจไม่รองรับ
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
$x = print_r($ar, true);
fwrite($f, $x);
|
|
|
|
|
Date :
2019-07-19 19:43:23 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 17 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-19 19:43:23
รายละเอียดของการตอบ ::
ไม่รูู้ว่า ว่างcode ถูกมั้ยแต่พอวางแล้วยังเหมือนเดิมค่ะ
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
for($i = 0; $i <= $num; $i++){
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
$current_y = $pdf->GetY(); // คืนค่าให้กับค่า current_y เมื่อเลยหน้า
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
}else{
$pdf->SetXY($current_x += $w, $current_y);
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
}
}
$x = print_r($ar, true);
fwrite($f, $x);
fclose($f);
$pdf->Output();
|
|
|
|
|
Date :
2019-07-20 07:56:00 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตัวอย่าง write log ผมอยู่ใน loop นะครับ จะได้รู้ทุกขั้นตอน การเปลี่ยนแปลง จะได้กำหนดข้อมูลได้ถูก
|
|
|
|
|
Date :
2019-07-20 11:18:29 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 20 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-20 11:18:29
รายละเอียดของการตอบ ::
ลองเอาไป cell ไปใส่แทน เป็นเหมือนเดิมค่ะ
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
for($i = 0; $i <= $num; $i++){
$pdf->cell(55, 30, 'Meterial : '.$MATNR .''.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, false, 'L', 1, 0, '', true);
//$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
$current_y = $pdf->GetY(); // คืนค่าให้กับค่า current_y เมื่อเลยหน้า
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
$x = print_r($ar, true);
fwrite($f, $x);
}else{
$pdf->SetXY($current_x += $w, $current_y);
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
$x = print_r($ar, true);
fwrite($f, $x);
}
}
fclose($f);
|
|
|
|
|
Date :
2019-07-20 14:08:33 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เอา log มาดูหน่อยครับ
เปลี่ยนไปใช้ MultiCell ก่อนครับ ผมว่าอันนั้นมันโอเคแล้ว มัน กรณียาวเกินมัน ขึ้นบรรทัดใหม่ให้
|
ประวัติการแก้ไข 2019-07-20 14:18:33
|
|
|
|
Date :
2019-07-20 14:16:46 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 24 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-20 16:30:29
รายละเอียดของการตอบ ::
ตอนนี้ ขึ้นหน้าใหม่แล้วค่ะแต่ขึ้นหน้าใหม่ทุกๆ 5 ช่อง ตามภาพค่ะ
code ที่เอาไปวางตามนี้ค่ะ if เคยลองเอาออกไปไว้นอก if( ($i%5) > 3))ผลลัพได้เหมือนกันค่ะ
ส่วนอันนี้ เอาใส่ทั้งใน if และ else
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
for($i = 0; $i <= $num; $i++){
//$pdf->Cell(55, 30, 'Meterial : '.$MATNR .''.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, false, 'L', 1, 0, '', '', true);
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=0, $current_y += $h);
if( ($current_y + $h) > $last_y){
$pdf->addPage(); // $current_y > page_height ขึ้นหน้าใหม่
$current_y = 10; //ตรงนี้ 10 กำหนด ตามความเหมาะสม
$pdf->SetXY(0 , $current_y);
}
// $current_y = $pdf->GetY(); // ไม่ต้องใช้ แล้ว //คืนค่าให้กับค่า current_y เมื่อเลยหน้า
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
$x = print_r($ar, true);
fwrite($f, $x);
}else{
$pdf->SetXY($current_x += $w, $current_y);
if( ($current_y + $h) > $last_y){
$pdf->addPage(); // $current_y > page_height ขึ้นหน้าใหม่
$current_y = 10; //ตรงนี้ 10 กำหนด ตามความเหมาะสม
$pdf->SetXY(0 , $current_y);
}
// $current_y = $pdf->GetY(); // ไม่ต้องใช้ แล้ว //คืนค่าให้กับค่า current_y เมื่อเลยหน้า
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y);
$x = print_r($ar, true);
fwrite($f, $x);
}
}
fclose($f);
อันนี้เป็น log ที่เก็บ
Array([line] => 165[i] => 0[i_5] => 0[pos_x] => 50[pos_y] => 18)Array([line] => 165[i] => 1[i_5] => 1[pos_x] => 100[pos_y] => 18)
Array([line] => 165[i] => 2[i_5] => 2[pos_x] => 150[pos_y] => 18)Array([line] => 165[i] => 3[i_5] => 3[pos_x] => 200[pos_y] => 18)
Array([line] => 154[i] => 4[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 5[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 6[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 7[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 8[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 9[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 10[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 11[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 12[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 13[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 14[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 15[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 16[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 17[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 18[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 19[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 20[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 21[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 22[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 23[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 24[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 25[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 26[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 27[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 28[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 29[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 30[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 31[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 32[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 33[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 34[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 35[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 36[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 37[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 38[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 39[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 40[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 41[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 42[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 43[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 44[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 45[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 46[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 47[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 48[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 49[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 50[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 51[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 52[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 53[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 54[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 55[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 56[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 57[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 58[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 59[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 60[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 61[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 62[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 63[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 64[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 65[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 66[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 67[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 68[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 69[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 70[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 71[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 72[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 73[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 74[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 75[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 76[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 77[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 78[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 79[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 80[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 81[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 82[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 83[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 84[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 85[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 86[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 87[i_5] => 2[pos_x] => 150[pos_y] => 10)
Array([line] => 165[i] => 88[i_5] => 3[pos_x] => 200[pos_y] => 10)Array([line] => 154[i] => 89[i_5] => 4[pos_x] => 0[pos_y] => 10)
Array([line] => 165[i] => 90[i_5] => 0[pos_x] => 50[pos_y] => 10)Array([line] => 165[i] => 91[i_5] => 1[pos_x] => 100[pos_y] => 10)
Array([line] => 165[i] => 92[i_5] => 2[pos_x] => 150[pos_y] => 10)Array([line] => 165[i] => 93[i_5] => 3[pos_x] => 200[pos_y] => 10)
Array([line] => 154[i] => 94[i_5] => 4[pos_x] => 0[pos_y] => 10)Array([line] => 165[i] => 95[i_5] => 0[pos_x] => 50[pos_y] => 10)
Array([line] => 165[i] => 96[i_5] => 1[pos_x] => 100[pos_y] => 10)Array([line] => 165[i] => 97[i_5] => 2[pos_x] => 150[pos_y] => 10)
|
|
|
|
|
Date :
2019-07-22 08:50:19 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทำไม pos_y มันได้แค่ 10 ตลอด ผิดผลาดตรงไหนหว่า
ของเก่า มันขยับตลอด ทุกๆ 5 รายการ
เพิ่ม log อีกนิด
Code (PHP)
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y
, 'org_y'=>$pdf->GetY() // เพิ่มตรงนี้
);
บันทัด 27 - 30 ใส่ไว้ทำไมครับ มันขยับเฉพาะ x ที่เป็น column เท่านั้น y มันไม่ขยับ
|
ประวัติการแก้ไข 2019-07-22 11:05:16
|
|
|
|
Date :
2019-07-22 11:01:25 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 27 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 11:01:25
รายละเอียดของการตอบ ::
Log ค่ะ
Array([line] => 166[i] => 0[i_5] => 0[pos_x] => 50[pos_y] => 18[org_y] => 18)
Array([line] => 166[i] => 1[i_5] => 1[pos_x] => 100[pos_y] => 18[org_y] => 18)
Array([line] => 166[i] => 2[i_5] => 2[pos_x] => 150[pos_y] => 18[org_y] => 18)
Array([line] => 166[i] => 3[i_5] => 3[pos_x] => 200[pos_y] => 18[org_y] => 18)
Array([line] => 154[i] => 4[i_5] => 4[pos_x] => 0[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 5[i_5] => 0[pos_x] => 50[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 6[i_5] => 1[pos_x] => 100[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 7[i_5] => 2[pos_x] => 150[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 8[i_5] => 3[pos_x] => 200[pos_y] => 10[org_y] => 10)
Array([line] => 154[i] => 9[i_5] => 4[pos_x] => 0[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 10[i_5] => 0[pos_x] => 50[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 11[i_5] => 1[pos_x] => 100[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 12[i_5] => 2[pos_x] => 150[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 13[i_5] => 3[pos_x] => 200[pos_y] => 10[org_y] => 10)
Array([line] => 154[i] => 14[i_5] => 4[pos_x] => 0[pos_y] => 10[org_y] => 10)
.
.
.
.
Array([line] => 166[i] => 93[i_5] => 0[pos_x] => 50[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 94[i_5] => 1[pos_x] => 100[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 95[i_5] => 2[pos_x] => 150[pos_y] => 10[org_y] => 10)
Array([line] => 166[i] => 96[i_5] => 3[pos_x] => 200[pos_y] => 10[org_y] => 10)
Array([line] => 154[i] => 97[i_5] => 4[pos_x] => 0[pos_y] => 10[org_y] => 10)
|
|
|
|
|
Date :
2019-07-22 11:14:58 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
เปลี่ยน algorithm ใหม่ ตรวจเช็คจาก รายการแรกแทน
ส่วนทำไม 5 บันทัด เดี๋ยวเช็ค log ดูอีกที
Code (PHP)
<?php
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
$default_x = 0; //ตรงนี้ กำหนด ตามความเหมาะสม
$default_y = 10; //ตรงนี้ กำหนด ตามความเหมาะสม
for($i = 0; $i <= $num; $i++){
// รู้แล้ว ต้อง เช็คก่อน print อันแรก
if( ($i%5)<1 && $i > 0){ // = 0
if( ($pdf->GetY() + $h) > $last_y){ // (y + ความสูง) > page_height ขึ้นหน้าใหม่
$pdf->addPage();
$current_x = $default_x;
$current_y = $default_y;
$pdf->SetXY($current_x , $current_y);
}
}
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=$default_x, $current_y += $h);
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY());
$x = print_r($ar, true);
fwrite($f, $x);
}
fclose($f);
|
|
|
|
|
Date :
2019-07-22 11:29:49 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 31 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 11:29:49
รายละเอียดของการตอบ ::
log เอามาให้ประมาณนี้นะคะ เนื่องจากบรรทัดต่อๆไปก็เหมือนกัน
Array
(
[line] => 161
[i] => 0
[i_5] => 0
[pos_x] => 50
[pos_y] => 18
[org_X] => 50
[org_y] => 18
)
Array
(
[line] => 161
[i] => 1
[i_5] => 1
[pos_x] => 100
[pos_y] => 18
[org_X] => 100
[org_y] => 18
)
Array
(
[line] => 161
[i] => 2
[i_5] => 2
[pos_x] => 150
[pos_y] => 18
[org_X] => 150
[org_y] => 18
)
Array
(
[line] => 161
[i] => 3
[i_5] => 3
[pos_x] => 200
[pos_y] => 18
[org_X] => 200
[org_y] => 18
)
Array
(
[line] => 161
[i] => 4
[i_5] => 4
[pos_x] => 0
[pos_y] => 48
[org_X] => 0
[org_y] => 48
)
Array
(
[line] => 161
[i] => 5
[i_5] => 0
[pos_x] => 50
[pos_y] => 10
[org_X] => 50
[org_y] => 10
)
Array
(
[line] => 161
[i] => 6
[i_5] => 1
[pos_x] => 100
[pos_y] => 10
[org_X] => 100
[org_y] => 10
)
Array
(
[line] => 161
[i] => 7
[i_5] => 2
[pos_x] => 150
[pos_y] => 10
[org_X] => 150
[org_y] => 10
)
Array
(
[line] => 161
[i] => 8
[i_5] => 3
[pos_x] => 200
[pos_y] => 10
[org_X] => 200
[org_y] => 10
)
Array
(
[line] => 161
[i] => 9
[i_5] => 4
[pos_x] => 0
[pos_y] => 40
[org_X] => 0
[org_y] => 40
)
Array
(
[line] => 161
[i] => 10
[i_5] => 0
[pos_x] => 50
[pos_y] => 10
[org_X] => 50
[org_y] => 10
)
Array
(
[line] => 161
[i] => 11
[i_5] => 1
[pos_x] => 100
[pos_y] => 10
[org_X] => 100
[org_y] => 10
)
Array
(
[line] => 161
[i] => 12
[i_5] => 2
[pos_x] => 150
[pos_y] => 10
[org_X] => 150
[org_y] => 10
)
Array
(
[line] => 161
[i] => 13
[i_5] => 3
[pos_x] => 200
[pos_y] => 10
[org_X] => 200
[org_y] => 10
)
Array
(
[line] => 161
[i] => 14
[i_5] => 4
[pos_x] => 0
[pos_y] => 40
[org_X] => 0
[org_y] => 40
)
Array
(
[line] => 161
[i] => 15
[i_5] => 0
[pos_x] => 50
[pos_y] => 10
[org_X] => 50
[org_y] => 10
)
Array
(
[line] => 161
[i] => 16
[i_5] => 1
[pos_x] => 100
[pos_y] => 10
[org_X] => 100
[org_y] => 10
)
Array
(
[line] => 161
[i] => 17
[i_5] => 2
[pos_x] => 150
[pos_y] => 10
[org_X] => 150
[org_y] => 10
)
Array
(
[line] => 161
[i] => 18
[i_5] => 3
[pos_x] => 200
[pos_y] => 10
[org_X] => 200
[org_y] => 10
)
Array
(
[line] => 161
[i] => 19
[i_5] => 4
[pos_x] => 0
[pos_y] => 40
[org_X] => 0
[org_y] => 40
)
Array
(
[line] => 161
[i] => 20
[i_5] => 0
[pos_x] => 50
[pos_y] => 10
[org_X] => 50
[org_y] => 10
)
Array
(
[line] => 161
[i] => 21
[i_5] => 1
[pos_x] => 100
[pos_y] => 10
[org_X] => 100
[org_y] => 10
)
Array
(
[line] => 161
[i] => 22
[i_5] => 2
[pos_x] => 150
[pos_y] => 10
[org_X] => 150
[org_y] => 10
)
Array
(
[line] => 161
[i] => 23
[i_5] => 3
[pos_x] => 200
[pos_y] => 10
[org_X] => 200
[org_y] => 10
)
Array
(
[line] => 161
[i] => 24
[i_5] => 4
[pos_x] => 0
[pos_y] => 40
[org_X] => 0
[org_y] => 40
)
|
|
|
|
|
Date :
2019-07-22 11:49:21 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
//------------------------- เพิ่มบันทัดนี้ หน่อย --------------------------------------
$ar=array('line'=> __LINE__ , 'margin'=>$margin, 'last_y'=>$last_y, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY());
$x = print_r($ar, true);
fwrite($f, $x);
//--------------------------------------------------------------------------------------
ดูจาก log พอรายการ ที่ 5 (i ^ 5) = 4 position y ถูกบวกเพิ่ม ตำแหน่งก็ถูกเปลี่ยนตาม $pdf->SetXY() ก็ทำงาน
แต่พอมัน กลับไปเริ่มต้น loop ใหม่ รายการ 2 - 5 position y มันถูก reset ไปเป็น 10
Array([line] => 161[i] => 3[i_5] => 3[pos_x] => 200[pos_y] => 18[org_X] => 200[org_y] => 18)
Array([line] => 161[i] => 4[i_5] => 4[pos_x] => 0[pos_y] => 48[org_X] => 0[org_y] => 48)
Array([line] => 161[i] => 5[i_5] => 0[pos_x] => 50[pos_y] => 10[org_X] => 50[org_y] => 10)
เลยอยากรู้ว่า last_y มัน เป็นเท่าไหร่แน่
แต่ position Y มันก็ไม่ควรจะเปลี่ยนตำแหน่ง กลับไป เป็น 10 เพราะ มัน ไม่ได้ถูกเซทจากตรงไหนเลย ในโค๊ดของผม
if( ($i%5)<1 && $i > 0){ // = 0
if( ($pdf->GetY() + $h) > $last_y){ // (y + ความสูง) > page_height ขึ้นหน้าใหม่
// จะทำตรงนี้ได้ ก็ต้องเป็นรายการ 0 และ $i>0
// และ postition y + ความสูงของ cell มากกว่า last y
// และ code ภายใน if นี้เท่านั้น ที่ เปลี่ยน position y เป็น 10
}
}
ผมเว่าเอาโค๊ดจริงๆ ที่ทำมาดูหน่อยครับ ไม่น่าจะเป็นโค๊ดที่ผมทำเป็นตัวอย่างให้ดู เอาไปประยุกต์ยังไง แน่
ได้เอาโค๊ดผมไปประยุกต์ใช้งานจริงๆ หรือเปล่า
|
ประวัติการแก้ไข 2019-07-22 13:13:24
|
|
|
|
Date :
2019-07-22 13:09:01 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 33 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 13:09:01
รายละเอียดของการตอบ ::
ไม่ได้เอาไปประยุกต์ค่ะ แต่เอาใช้เลย
อันนี้คือ code ใช้รันค่ะ
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
$default_x = 0; //ตรงนี้ กำหนด ตามความเหมาะสม
$default_y = 10; //ตรงนี้ กำหนด ตามความเหมาะสม
for($i = 0; $i <= $num; $i++){
// รู้แล้ว ต้อง เช็คก่อน print อันแรก
if( ($i%5)<1 && $i > 0){ // = 0
if( ($pdf->GetY() + $h) > $last_y){ // (y + ความสูง) > page_height ขึ้นหน้าใหม่
$pdf->addPage();
$current_x = $default_x;
$current_y = $default_y;
$pdf->SetXY($current_x , $current_y);
}
}
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=$default_x, $current_y += $h);
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5), 'pos_x'=>$current_x, 'pos_y'=>$current_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY());
$x = print_r($ar, true);
fwrite($f, $x);
}
fclose($f);
|
|
|
|
|
Date :
2019-07-22 13:21:57 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo $last_y มาดูหน่อยครับ
เปลี่ยน
Code (PHP)
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5)
, 'pos_x'=>$current_x, 'pos_y'=>$current_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY()
);
$x = print_r($ar, true);
เป็น
Code (PHP)
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5)
, 'pos_x'=>$current_x, 'pos_y'=>$current_y, 'last_y'=>$last_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY()
);
$x = json_encode($ar);
จะได้อยู่บันทัดเดียวกัน
|
ประวัติการแก้ไข 2019-07-22 13:35:08
|
|
|
|
Date :
2019-07-22 13:34:49 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 35 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 13:34:49
รายละเอียดของการตอบ ::
Log แสดงแบบนี้ค่ะ
{"line":161,"i":0,"i_5":0,"pos_x":50,"pos_y":18,"last_y":54.0808842901,"org_X":50,"org_y":18}{"line":161,"i":1,"i_5":1,"pos_x":100,"pos_y":18,"last_y":54.0808842901,"org_X":100,"org_y":18}{"line":161,"i":2,"i_5":2,"pos_x":150,"pos_y":18,"last_y":54.0808842901,"org_X":150,"org_y":18}{"line":161,"i":3,"i_5":3,"pos_x":200,"pos_y":18,"last_y":54.0808842901,"org_X":200,"org_y":18}{"line":161,"i":4,"i_5":4,"pos_x":0,"pos_y":48,"last_y":54.0808842901,"org_X":0,"org_y":48}{"line":161,"i":5,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":6,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":7,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":8,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":9,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":10,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":11,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":12,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":13,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":14,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":15,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":16,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":17,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":18,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":19,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":20,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":21,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":22,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":23,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":24,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":25,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":26,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":27,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":28,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":29,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":30,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":31,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":32,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":33,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":34,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":35,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":36,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":37,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":38,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":39,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":40,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":41,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":42,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":43,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":44,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":45,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":46,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":47,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":48,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":49,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":50,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":51,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":52,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":53,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":54,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":55,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":56,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":57,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":58,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":59,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":60,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":61,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":62,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":63,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":64,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":65,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":66,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":67,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":68,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":69,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":70,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":71,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":72,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":73,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":74,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":75,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":76,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":77,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":78,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":79,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":80,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":81,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":82,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":83,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":84,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":85,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":86,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":87,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":88,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":89,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":90,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":91,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":92,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":161,"i":93,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":161,"i":94,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":161,"i":95,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":161,"i":96,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":161,"i":97,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}
|
|
|
|
|
Date :
2019-07-22 13:40:59 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
กรรม last_y แค่ 54 เอง
ขอ log จาก คห 33 ด้วยนะครับ
สงสัยมันจะได้คนละหน่วย ต้องดู config ต่างๆ อีกทีมั้งครับ ใช้หน่วยไหนกันแน่
คงต้องอ่าน document อีกที แล้วค่อยนำมาแปลง ใช้งานให้ถูกต้อง
|
|
|
|
|
Date :
2019-07-22 13:51:46 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 37 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 13:51:46
รายละเอียดของการตอบ ::
อันนี้เป็นLog ทั้งหมด และ codeที่ใช้รันค่ะ
Array
(
[line] => 143
[margin] => Array
(
[left] => 15
[right] => 15
[top] => 27
[bottom] => 20.0025
[header] => 5
[footer] =>
[cell] => Array
(
[T] => 0
[R] => 1.000125
[B] => 0
[L] => 1.000125
)
[padding_left] => 1.000125
[padding_top] => 0
[padding_right] => 1.000125
[padding_bottom] => 0
)
[last_y] => 54.0808842901
[org_X] => 0
[org_y] => 18
)
{"line":164,"i":0,"i_5":0,"pos_x":50,"pos_y":18,"last_y":54.0808842901,"org_X":50,"org_y":18}{"line":164,"i":1,"i_5":1,"pos_x":100,"pos_y":18,"last_y":54.0808842901,"org_X":100,"org_y":18}{"line":164,"i":2,"i_5":2,"pos_x":150,"pos_y":18,"last_y":54.0808842901,"org_X":150,"org_y":18}{"line":164,"i":3,"i_5":3,"pos_x":200,"pos_y":18,"last_y":54.0808842901,"org_X":200,"org_y":18}{"line":164,"i":4,"i_5":4,"pos_x":0,"pos_y":48,"last_y":54.0808842901,"org_X":0,"org_y":48}{"line":164,"i":5,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":6,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":7,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":8,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":9,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":10,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":11,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":12,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":13,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":14,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":15,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":16,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":17,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":18,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":19,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":20,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":21,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":22,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":23,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":24,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":25,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":26,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":27,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":28,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":29,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":30,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":31,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":32,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":33,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":34,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":35,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":36,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":37,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":38,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":39,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":40,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":41,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":42,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":43,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":44,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":45,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":46,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":47,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":48,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":49,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":50,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":51,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":52,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":53,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":54,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":55,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":56,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":57,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":58,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":59,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":60,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":61,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":62,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":63,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":64,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":65,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":66,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":67,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":68,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":69,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":70,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":71,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":72,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":73,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":74,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":75,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":76,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":77,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":78,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":79,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":80,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":81,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":82,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":83,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":84,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":85,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":86,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":87,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":88,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":89,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":90,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":91,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":92,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}{"line":164,"i":93,"i_5":3,"pos_x":200,"pos_y":10,"last_y":54.0808842901,"org_X":200,"org_y":10}{"line":164,"i":94,"i_5":4,"pos_x":0,"pos_y":40,"last_y":54.0808842901,"org_X":0,"org_y":40}{"line":164,"i":95,"i_5":0,"pos_x":50,"pos_y":10,"last_y":54.0808842901,"org_X":50,"org_y":10}{"line":164,"i":96,"i_5":1,"pos_x":100,"pos_y":10,"last_y":54.0808842901,"org_X":100,"org_y":10}{"line":164,"i":97,"i_5":2,"pos_x":150,"pos_y":10,"last_y":54.0808842901,"org_X":150,"org_y":10}
Code (PHP)
$w = 50;
$h = 30;
$current_x = 0;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
$ar=array('line'=> __LINE__ , 'margin'=>$margin, 'last_y'=>$last_y, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY());
$x = print_r($ar, true);
fwrite($f, $x);
$default_x = 0; //ตรงนี้ กำหนด ตามความเหมาะสม
$default_y = 10; //ตรงนี้ กำหนด ตามความเหมาะสม
for($i = 0; $i <= $num; $i++){
// รู้แล้ว ต้อง เช็คก่อน print อันแรก
if( ($i%5)<1 && $i > 0){ // = 0
if( ($pdf->GetY() + $h) > $last_y){ // (y + ความสูง) > page_height ขึ้นหน้าใหม่
$pdf->addPage();
$current_x = $default_x;
$current_y = $default_y;
$pdf->SetXY($current_x , $current_y);
}
}
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=$default_x, $current_y += $h);
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
$ar=array('line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5)
, 'pos_x'=>$current_x, 'pos_y'=>$current_y, 'last_y'=>$last_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY()
);
$x = json_encode($ar);
fwrite($f, $x);
}
fclose($f);
|
|
|
|
|
Date :
2019-07-22 14:04:25 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$totalHeight = $pdf->getPageHeight($page) / $pdf->getScaleFactor(); เอาสีแดงออก แล้วเพิ่ม log ให้ด้วย
$ar = array( 'page_height'=>$totalHeight, .....
|
|
|
|
|
Date :
2019-07-22 14:13:11 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตอบความคิดเห็นที่ : 39 เขียนโดย : Chaidhanan เมื่อวันที่ 2019-07-22 14:13:11
รายละเอียดของการตอบ ::
ได้แล้วค่ะ ขอบคุณมากๆเลยที่ช่วย
อันนี้เป็นLog ที่ได้ และ code ที่รัน
Code (PHP)
$w = 50;
$h = 30;
$current_x = 20;
$current_y = $pdf->GetY();
$pdf->SetXY($current_x, $current_y);
$num = count($_POST['MATNR']);
$f = fopen('test.txt', 'w');
$totalHeight = $pdf->getPageHeight($page) ;
// / $pdf->getScaleFactor();
$margin = $pdf->getMargins();
$last_y = $totalHeight - $margin['bottom'];
$ar=array('page_height'=>$totalHeight,'line'=> __LINE__ , 'margin'=>$margin, 'last_y'=>$last_y, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY());
$x = print_r($ar, true);
fwrite($f, $x);
$default_x = 20; //ตรงนี้ กำหนด ตามความเหมาะสม
$default_y = 25; //ตรงนี้ กำหนด ตามความเหมาะสม
for($i = 0; $i <= $num; $i++){
// รู้แล้ว ต้อง เช็คก่อน print อันแรก
if( ($i%5)<1 && $i > 0){ // = 0
if( ($pdf->GetY() + $h) > $last_y){ // (y + ความสูง) > page_height ขึ้นหน้าใหม่
$pdf->addPage();
$current_x = $default_x;
$current_y = $default_y;
$pdf->SetXY($current_x , $current_y);
}
}
$pdf->MultiCell($w, $h,'Meterial : '.$MATNR.' '.'Location : '.$LGORT.' '.'Reservation : '.$RSNUM.' '.'Batch No. : '.$CHARG, 1, 'L', 1, 0, '', '', true);
if( ($i%5) > 3){ // = 4
$pdf->SetXY($current_x=$default_x, $current_y += $h);
}else{
$pdf->SetXY($current_x += $w, $current_y);
}
$ar=array('page_height'=>$totalHeight,'line'=> __LINE__ , 'i'=>$i, 'i_5'=>($i % 5)
, 'pos_x'=>$current_x, 'pos_y'=>$current_y, 'last_y'=>$last_y
, 'org_X'=>$pdf->GetX(), 'org_y'=>$pdf->GetY()
);
$x = json_encode($ar);
fwrite($f, $x);
}
fclose($f);
Array
(
[page_height] => 210.000144444
[line] => 144
[margin] => Array
(
[left] => 15
[right] => 15
[top] => 27
[bottom] => 20.0025
[header] => 5
[footer] =>
[cell] => Array
(
[T] => 0
[R] => 1.000125
[B] => 0
[L] => 1.000125
)
[padding_left] => 1.000125
[padding_top] => 0
[padding_right] => 1.000125
[padding_bottom] => 0
)
[last_y] => 189.997644444
[org_X] => 20
[org_y] => 26
)
{"page_height":210.000144444,"line":165,"i":0,"i_5":0,"pos_x":70,"pos_y":26,"last_y":189.997644444,"org_X":70,"org_y":26}{"page_height":210.000144444,"line":165,"i":1,"i_5":1,"pos_x":120,"pos_y":26,"last_y":189.997644444,"org_X":120,"org_y":26}{"page_height":210.000144444,"line":165,"i":2,"i_5":2,"pos_x":170,"pos_y":26,"last_y":189.997644444,"org_X":170,"org_y":26}{"page_height":210.000144444,"line":165,"i":3,"i_5":3,"pos_x":220,"pos_y":26,"last_y":189.997644444,"org_X":220,"org_y":26}{"page_height":210.000144444,"line":165,"i":4,"i_5":4,"pos_x":20,"pos_y":56,"last_y":189.997644444,"org_X":20,"org_y":56}{"page_height":210.000144444,"line":165,"i":5,"i_5":0,"pos_x":70,"pos_y":56,"last_y":189.997644444,"org_X":70,"org_y":56}{"page_height":210.000144444,"line":165,"i":6,"i_5":1,"pos_x":120,"pos_y":56,"last_y":189.997644444,"org_X":120,"org_y":56}{"page_height":210.000144444,"line":165,"i":7,"i_5":2,"pos_x":170,"pos_y":56,"last_y":189.997644444,"org_X":170,"org_y":56}{"page_height":210.000144444,"line":165,"i":8,"i_5":3,"pos_x":220,"pos_y":56,"last_y":189.997644444,"org_X":220,"org_y":56}{"page_height":210.000144444,"line":165,"i":9,"i_5":4,"pos_x":20,"pos_y":86,"last_y":189.997644444,"org_X":20,"org_y":86}{"page_height":210.000144444,"line":165,"i":10,"i_5":0,"pos_x":70,"pos_y":86,"last_y":189.997644444,"org_X":70,"org_y":86}{"page_height":210.000144444,"line":165,"i":11,"i_5":1,"pos_x":120,"pos_y":86,"last_y":189.997644444,"org_X":120,"org_y":86}{"page_height":210.000144444,"line":165,"i":12,"i_5":2,"pos_x":170,"pos_y":86,"last_y":189.997644444,"org_X":170,"org_y":86}{"page_height":210.000144444,"line":165,"i":13,"i_5":3,"pos_x":220,"pos_y":86,"last_y":189.997644444,"org_X":220,"org_y":86}{"page_height":210.000144444,"line":165,"i":14,"i_5":4,"pos_x":20,"pos_y":116,"last_y":189.997644444,"org_X":20,"org_y":116}{"page_height":210.000144444,"line":165,"i":15,"i_5":0,"pos_x":70,"pos_y":116,"last_y":189.997644444,"org_X":70,"org_y":116}{"page_height":210.000144444,"line":165,"i":16,"i_5":1,"pos_x":120,"pos_y":116,"last_y":189.997644444,"org_X":120,"org_y":116}{"page_height":210.000144444,"line":165,"i":17,"i_5":2,"pos_x":170,"pos_y":116,"last_y":189.997644444,"org_X":170,"org_y":116}{"page_height":210.000144444,"line":165,"i":18,"i_5":3,"pos_x":220,"pos_y":116,"last_y":189.997644444,"org_X":220,"org_y":116}{"page_height":210.000144444,"line":165,"i":19,"i_5":4,"pos_x":20,"pos_y":146,"last_y":189.997644444,"org_X":20,"org_y":146}{"page_height":210.000144444,"line":165,"i":20,"i_5":0,"pos_x":70,"pos_y":146,"last_y":189.997644444,"org_X":70,"org_y":146}{"page_height":210.000144444,"line":165,"i":21,"i_5":1,"pos_x":120,"pos_y":146,"last_y":189.997644444,"org_X":120,"org_y":146}{"page_height":210.000144444,"line":165,"i":22,"i_5":2,"pos_x":170,"pos_y":146,"last_y":189.997644444,"org_X":170,"org_y":146}{"page_height":210.000144444,"line":165,"i":23,"i_5":3,"pos_x":220,"pos_y":146,"last_y":189.997644444,"org_X":220,"org_y":146}{"page_height":210.000144444,"line":165,"i":24,"i_5":4,"pos_x":20,"pos_y":176,"last_y":189.997644444,"org_X":20,"org_y":176}{"page_height":210.000144444,"line":165,"i":25,"i_5":0,"pos_x":70,"pos_y":25,"last_y":189.997644444,"org_X":70,"org_y":25}{"page_height":210.000144444,"line":165,"i":26,"i_5":1,"pos_x":120,"pos_y":25,"last_y":189.997644444,"org_X":120,"org_y":25}{"page_height":210.000144444,"line":165,"i":27,"i_5":2,"pos_x":170,"pos_y":25,"last_y":189.997644444,"org_X":170,"org_y":25}{"page_height":210.000144444,"line":165,"i":28,"i_5":3,"pos_x":220,"pos_y":25,"last_y":189.997644444,"org_X":220,"org_y":25}{"page_height":210.000144444,"line":165,"i":29,"i_5":4,"pos_x":20,"pos_y":55,"last_y":189.997644444,"org_X":20,"org_y":55}{"page_height":210.000144444,"line":165,"i":30,"i_5":0,"pos_x":70,"pos_y":55,"last_y":189.997644444,"org_X":70,"org_y":55}{"page_height":210.000144444,"line":165,"i":31,"i_5":1,"pos_x":120,"pos_y":55,"last_y":189.997644444,"org_X":120,"org_y":55}{"page_height":210.000144444,"line":165,"i":32,"i_5":2,"pos_x":170,"pos_y":55,"last_y":189.997644444,"org_X":170,"org_y":55}{"page_height":210.000144444,"line":165,"i":33,"i_5":3,"pos_x":220,"pos_y":55,"last_y":189.997644444,"org_X":220,"org_y":55}{"page_height":210.000144444,"line":165,"i":34,"i_5":4,"pos_x":20,"pos_y":85,"last_y":189.997644444,"org_X":20,"org_y":85}{"page_height":210.000144444,"line":165,"i":35,"i_5":0,"pos_x":70,"pos_y":85,"last_y":189.997644444,"org_X":70,"org_y":85}{"page_height":210.000144444,"line":165,"i":36,"i_5":1,"pos_x":120,"pos_y":85,"last_y":189.997644444,"org_X":120,"org_y":85}{"page_height":210.000144444,"line":165,"i":37,"i_5":2,"pos_x":170,"pos_y":85,"last_y":189.997644444,"org_X":170,"org_y":85}{"page_height":210.000144444,"line":165,"i":38,"i_5":3,"pos_x":220,"pos_y":85,"last_y":189.997644444,"org_X":220,"org_y":85}{"page_height":210.000144444,"line":165,"i":39,"i_5":4,"pos_x":20,"pos_y":115,"last_y":189.997644444,"org_X":20,"org_y":115}{"page_height":210.000144444,"line":165,"i":40,"i_5":0,"pos_x":70,"pos_y":115,"last_y":189.997644444,"org_X":70,"org_y":115}{"page_height":210.000144444,"line":165,"i":41,"i_5":1,"pos_x":120,"pos_y":115,"last_y":189.997644444,"org_X":120,"org_y":115}{"page_height":210.000144444,"line":165,"i":42,"i_5":2,"pos_x":170,"pos_y":115,"last_y":189.997644444,"org_X":170,"org_y":115}{"page_height":210.000144444,"line":165,"i":43,"i_5":3,"pos_x":220,"pos_y":115,"last_y":189.997644444,"org_X":220,"org_y":115}{"page_height":210.000144444,"line":165,"i":44,"i_5":4,"pos_x":20,"pos_y":145,"last_y":189.997644444,"org_X":20,"org_y":145}{"page_height":210.000144444,"line":165,"i":45,"i_5":0,"pos_x":70,"pos_y":145,"last_y":189.997644444,"org_X":70,"org_y":145}{"page_height":210.000144444,"line":165,"i":46,"i_5":1,"pos_x":120,"pos_y":145,"last_y":189.997644444,"org_X":120,"org_y":145}{"page_height":210.000144444,"line":165,"i":47,"i_5":2,"pos_x":170,"pos_y":145,"last_y":189.997644444,"org_X":170,"org_y":145}{"page_height":210.000144444,"line":165,"i":48,"i_5":3,"pos_x":220,"pos_y":145,"last_y":189.997644444,"org_X":220,"org_y":145}{"page_height":210.000144444,"line":165,"i":49,"i_5":4,"pos_x":20,"pos_y":175,"last_y":189.997644444,"org_X":20,"org_y":175}{"page_height":210.000144444,"line":165,"i":50,"i_5":0,"pos_x":70,"pos_y":25,"last_y":189.997644444,"org_X":70,"org_y":25}{"page_height":210.000144444,"line":165,"i":51,"i_5":1,"pos_x":120,"pos_y":25,"last_y":189.997644444,"org_X":120,"org_y":25}{"page_height":210.000144444,"line":165,"i":52,"i_5":2,"pos_x":170,"pos_y":25,"last_y":189.997644444,"org_X":170,"org_y":25}{"page_height":210.000144444,"line":165,"i":53,"i_5":3,"pos_x":220,"pos_y":25,"last_y":189.997644444,"org_X":220,"org_y":25}{"page_height":210.000144444,"line":165,"i":54,"i_5":4,"pos_x":20,"pos_y":55,"last_y":189.997644444,"org_X":20,"org_y":55}{"page_height":210.000144444,"line":165,"i":55,"i_5":0,"pos_x":70,"pos_y":55,"last_y":189.997644444,"org_X":70,"org_y":55}{"page_height":210.000144444,"line":165,"i":56,"i_5":1,"pos_x":120,"pos_y":55,"last_y":189.997644444,"org_X":120,"org_y":55}{"page_height":210.000144444,"line":165,"i":57,"i_5":2,"pos_x":170,"pos_y":55,"last_y":189.997644444,"org_X":170,"org_y":55}{"page_height":210.000144444,"line":165,"i":58,"i_5":3,"pos_x":220,"pos_y":55,"last_y":189.997644444,"org_X":220,"org_y":55}{"page_height":210.000144444,"line":165,"i":59,"i_5":4,"pos_x":20,"pos_y":85,"last_y":189.997644444,"org_X":20,"org_y":85}{"page_height":210.000144444,"line":165,"i":60,"i_5":0,"pos_x":70,"pos_y":85,"last_y":189.997644444,"org_X":70,"org_y":85}{"page_height":210.000144444,"line":165,"i":61,"i_5":1,"pos_x":120,"pos_y":85,"last_y":189.997644444,"org_X":120,"org_y":85}{"page_height":210.000144444,"line":165,"i":62,"i_5":2,"pos_x":170,"pos_y":85,"last_y":189.997644444,"org_X":170,"org_y":85}{"page_height":210.000144444,"line":165,"i":63,"i_5":3,"pos_x":220,"pos_y":85,"last_y":189.997644444,"org_X":220,"org_y":85}{"page_height":210.000144444,"line":165,"i":64,"i_5":4,"pos_x":20,"pos_y":115,"last_y":189.997644444,"org_X":20,"org_y":115}{"page_height":210.000144444,"line":165,"i":65,"i_5":0,"pos_x":70,"pos_y":115,"last_y":189.997644444,"org_X":70,"org_y":115}{"page_height":210.000144444,"line":165,"i":66,"i_5":1,"pos_x":120,"pos_y":115,"last_y":189.997644444,"org_X":120,"org_y":115}{"page_height":210.000144444,"line":165,"i":67,"i_5":2,"pos_x":170,"pos_y":115,"last_y":189.997644444,"org_X":170,"org_y":115}{"page_height":210.000144444,"line":165,"i":68,"i_5":3,"pos_x":220,"pos_y":115,"last_y":189.997644444,"org_X":220,"org_y":115}{"page_height":210.000144444,"line":165,"i":69,"i_5":4,"pos_x":20,"pos_y":145,"last_y":189.997644444,"org_X":20,"org_y":145}{"page_height":210.000144444,"line":165,"i":70,"i_5":0,"pos_x":70,"pos_y":145,"last_y":189.997644444,"org_X":70,"org_y":145}{"page_height":210.000144444,"line":165,"i":71,"i_5":1,"pos_x":120,"pos_y":145,"last_y":189.997644444,"org_X":120,"org_y":145}{"page_height":210.000144444,"line":165,"i":72,"i_5":2,"pos_x":170,"pos_y":145,"last_y":189.997644444,"org_X":170,"org_y":145}{"page_height":210.000144444,"line":165,"i":73,"i_5":3,"pos_x":220,"pos_y":145,"last_y":189.997644444,"org_X":220,"org_y":145}{"page_height":210.000144444,"line":165,"i":74,"i_5":4,"pos_x":20,"pos_y":175,"last_y":189.997644444,"org_X":20,"org_y":175}{"page_height":210.000144444,"line":165,"i":75,"i_5":0,"pos_x":70,"pos_y":25,"last_y":189.997644444,"org_X":70,"org_y":25}{"page_height":210.000144444,"line":165,"i":76,"i_5":1,"pos_x":120,"pos_y":25,"last_y":189.997644444,"org_X":120,"org_y":25}{"page_height":210.000144444,"line":165,"i":77,"i_5":2,"pos_x":170,"pos_y":25,"last_y":189.997644444,"org_X":170,"org_y":25}{"page_height":210.000144444,"line":165,"i":78,"i_5":3,"pos_x":220,"pos_y":25,"last_y":189.997644444,"org_X":220,"org_y":25}{"page_height":210.000144444,"line":165,"i":79,"i_5":4,"pos_x":20,"pos_y":55,"last_y":189.997644444,"org_X":20,"org_y":55}{"page_height":210.000144444,"line":165,"i":80,"i_5":0,"pos_x":70,"pos_y":55,"last_y":189.997644444,"org_X":70,"org_y":55}{"page_height":210.000144444,"line":165,"i":81,"i_5":1,"pos_x":120,"pos_y":55,"last_y":189.997644444,"org_X":120,"org_y":55}{"page_height":210.000144444,"line":165,"i":82,"i_5":2,"pos_x":170,"pos_y":55,"last_y":189.997644444,"org_X":170,"org_y":55}{"page_height":210.000144444,"line":165,"i":83,"i_5":3,"pos_x":220,"pos_y":55,"last_y":189.997644444,"org_X":220,"org_y":55}{"page_height":210.000144444,"line":165,"i":84,"i_5":4,"pos_x":20,"pos_y":85,"last_y":189.997644444,"org_X":20,"org_y":85}{"page_height":210.000144444,"line":165,"i":85,"i_5":0,"pos_x":70,"pos_y":85,"last_y":189.997644444,"org_X":70,"org_y":85}{"page_height":210.000144444,"line":165,"i":86,"i_5":1,"pos_x":120,"pos_y":85,"last_y":189.997644444,"org_X":120,"org_y":85}{"page_height":210.000144444,"line":165,"i":87,"i_5":2,"pos_x":170,"pos_y":85,"last_y":189.997644444,"org_X":170,"org_y":85}{"page_height":210.000144444,"line":165,"i":88,"i_5":3,"pos_x":220,"pos_y":85,"last_y":189.997644444,"org_X":220,"org_y":85}{"page_height":210.000144444,"line":165,"i":89,"i_5":4,"pos_x":20,"pos_y":115,"last_y":189.997644444,"org_X":20,"org_y":115}{"page_height":210.000144444,"line":165,"i":90,"i_5":0,"pos_x":70,"pos_y":115,"last_y":189.997644444,"org_X":70,"org_y":115}{"page_height":210.000144444,"line":165,"i":91,"i_5":1,"pos_x":120,"pos_y":115,"last_y":189.997644444,"org_X":120,"org_y":115}{"page_height":210.000144444,"line":165,"i":92,"i_5":2,"pos_x":170,"pos_y":115,"last_y":189.997644444,"org_X":170,"org_y":115}{"page_height":210.000144444,"line":165,"i":93,"i_5":3,"pos_x":220,"pos_y":115,"last_y":189.997644444,"org_X":220,"org_y":115}{"page_height":210.000144444,"line":165,"i":94,"i_5":4,"pos_x":20,"pos_y":145,"last_y":189.997644444,"org_X":20,"org_y":145}{"page_height":210.000144444,"line":165,"i":95,"i_5":0,"pos_x":70,"pos_y":145,"last_y":189.997644444,"org_X":70,"org_y":145}{"page_height":210.000144444,"line":165,"i":96,"i_5":1,"pos_x":120,"pos_y":145,"last_y":189.997644444,"org_X":120,"org_y":145}{"page_height":210.000144444,"line":165,"i":97,"i_5":2,"pos_x":170,"pos_y":145,"last_y":189.997644444,"org_X":170,"org_y":145}
|
|
|
|
|
Date :
2019-07-22 14:26:29 |
By :
mewhappy |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ก็เป็นวิธี debug โปรแกรม ไล่ไปที่ละขั้นตอน เดี๋ยวก็เจอครับ ถ้ารู้และตรวจสอบเอง ก็จะเร็ว นี่ต้องรอไปรอมา เลยนานหน่อย
แต่ต้องรู้ algorithm ว่าเราจะทำอะไร ผิดนิดหน่อยเดี๋ยวก็หาเจอ
|
|
|
|
|
Date :
2019-07-22 14:54:37 |
By :
Chaidhanan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|