https://t.me/RX1948
Server : Apache/2.4.18 (Ubuntu)
System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64
User : oppastar ( 1041)
PHP Version : 7.0.33-0ubuntu0.16.04.15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Directory :  /var/www/kanvakanva.com/public_html/application/views/admin/pdf/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //var/www/kanvakanva.com/public_html/application/views/admin/pdf/pdfreport.php
<?php

	tcpdf();
	$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', true);
	$pdf->setPrintHeader(false);
	$pdf->setPrintFooter(false);
	$pdf->AddPage();
	$pdf->resetColumns();
	$pdf->setEqualColumns(2, 88);  // KEY PART -  number of cols and width
	$pdf->selectColumn();    

	// set margins
	$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
	$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);

	// $pdf->setPageUnit('pt');
	$document_width = $pdf->pixelsToUnits('100');
	$document_height = $pdf->pixelsToUnits('100');
	$font_size = $pdf->pixelsToUnits('30');
	$pdf->SetFont ('Helvetica', '', $font_size , '', 'default', true );

	$count = 0;
	foreach ($id_orders as $id) {

		$tbl_header = '<table style="width: 255px; border: 1.5px solid black;" cellspacing="5">';
		$tbl_footer = '</table>';
		$tbl = '';



			$tbl .= '
				<tr>
			        <th colspan="2" style="vertical-align: bottom;"><img src="'.base_url('assets/frontend/img/logo.png').'" width="50" height="auto" alt=""/></th>
			        <th colspan="2" style="text-align:right; vertical-align: bottom;">'.$data[$id]['order']->payment_type.'</th>
			    </tr>
			    <tr style="border:1px solid black;">
				   <td colspan="4"><hr></td>
				</tr>
			    <tr>
			    	<th colspan="2" style=" padding: 20px">'.$data[$id]['order']->shipping_type.'</th>
			    	<th colspan="2" style=" padding: 20px">Berat &nbsp;&nbsp;&nbsp;: _________ Kg</th>
			    </tr>
			    <tr>
			    	<th colspan="2" style=" padding: 20px">Order : '.$data[$id]['order']->payment_confirmation_string.'</th>
			        <th colspan="2" style=" padding: 20px">Ongkir &nbsp;: Rp. '.$data[$id]['order']->shipping_fee.'</th>
			    </tr>
			    <tr style="border:1px solid black;">
				   <td colspan="4"><hr></td>
				</tr>
			    <tr>
			    	<th colspan="2" style=" padding: 20px">Kepada: </th>
			        <th colspan="2" style=" padding: 20px">Dari: </th>
			    </tr>
			    <tr>
			    	<th colspan="2" style=" padding: 20px">
		<strong>'.$data[$id]['order']->recipient_name.'</strong> <br>
		'.$data[$id]['order']->address.'<br>
		'.$data[$id]['order']->district.'<br>
		'.$data[$id]['order']->province.' '.$data[$id]['order']->postcode.' '.$data[$id]['order']->country.'<br>
		'.$data[$id]['order']->phone.'
					
			    	</th>
			        <th colspan="2" style=" padding: 20px">
		<strong>'.$configuration->website_name.'</strong> <br>
		Jagakarsa, Kota Administrasi<br>Jakarta Selatan <br>
		081355033577
			        
			         </th>
			    </tr>
			    <tr style="border:1px solid black;">
				   <td colspan="4"><hr></td>
				</tr> 
			    <tr>
			    		<th colspan="1" style="width: 9%;"></th>
				    	<th colspan="2" >Produk</th>
				    	<th colspan="1" >Jumlah</th>
			    </tr>

			';
			$i = 1;
			foreach ($data[$id]['order_details'] as $item) {
				$tbl .= '

				<tr>	
						<th  >'.$i.'.</th>
				    	<th colspan="2" ><p>'.$item->item_name.'</p></th>
				        <th colspan="1" > '.$item->quantity.'</th>
			    </tr>

				';
				$i++;
			}

			$tbl .= '<tr><td></td></tr>';

		$count++;

		if ($count%2 == 0  && $count) {
			# code...
			$tbl_footer .= '<br pagebreak="true"/>';

		}

		$pdf->writeHTML($tbl_header . $tbl . $tbl_footer, true, false, false, false, '');

	}

	$pdf->resetColumns();
	$pdf->Output('output.pdf', 'I');

?>

https://t.me/RX1948 - 2025