$pdf->SetX(10000);
                //di taro di 10000 agar sampai ujung jadi hilang dari kertas
                $pdf->MultiCell(240, $height, $keterangan, '0', 'L');
                $akhirY2 = $pdf->GetY();
                $tinggiKet2 = $akhirY2 - $awalY2;
                $height2 = $tinggiKet2;
                $pdf->SetY($akhirY2 - $tinggiKet2);
                ### tutupnya disini
                $pdf->SetFont('Arial', '', 7);
                $pdf->Cell(20, $height2, $i, 'TLR', 0, 'C');
                $pdf->Cell(120, $height2, $res3->namakaryawan . " (" . $tanggal . ") ", 'TLR', 0, 'L');
                $pdf->Cell(70, $height2, $res3->lokasitugas, 'TLR', 0, 'C');
                $pdf->Cell(100, $height2, $b['status'], 'TLR', 0, 'L');
                $pdf->MultiCell(240, $height, $keterangan, 'TLR', 'J');
                $pdf->Cell(20, 1.5 * $height, '', 'BLR', 0, 'C');
                $pdf->Cell(120, 1.5 * $height, $res2->namajabatan, 'BLR', 0, 'L');
                $pdf->Cell(70, 1.5 * $height, '', 'BLR', 0, 'C');
                $pdf->Cell(100, 1.5 * $height, '', 'BLR', 0, 'C');
                $pdf->Cell(240, 1.5 * $height, '', 'BLR', 1, 'L');
            } else {
                break;
            }
        }
    }
} else {
    $pdf->SetFont('Arial', '', 7);
    $pdf->Cell(520, 1.5 * $height, "Not Found", 'TBLR', 0, 'C');
}
$pdf->Cell(15, $height, 'Page ' . $pdf->PageNo(), '', 1, 'L');
# Print Out
$pdf->Output();