Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

How to display FPDF with JUI TABS

$
0
0
hello master, I have created a code like this :
in view
<?php 
$this->widget('zii.widgets.jui.CJuiTabs', array(
	'tabs'=>array(
		'Data Pasient'=>array(
			'ajax'=>$this->createUrl('viewPatient', array('id'=>$id))
		),
		'Pendaftaran'=>array(
			'ajax'=>$this->createUrl('newAddmission',array('id'=>$id, 'type'=>$type)),
		),
		'Kartu Pasien'=>array(
                        // link with problem ...!
			'ajax'=>$this->createUrl('patientCard',array('id'=>$id), true, true)
		),
	),
	'options'=>array(
		'collapsible' => true,
	),
));
?>


controller
public function actionPatientCard($id)
	{
		$patient = $this->loadPatient($id);
		// set card
		$pdf = new PDF_Code128('L','mm',array(100,155));
		$pdf->AddPage();
		$pdf->SetFont('Arial','',10);
		$pdf->Code128(11,30,$patient->no_rm,30,15);
		$pdf->Write(30,'No RM : '.$patient->no_rm);
		$pdf->Output();
	}


the problem is that this is the code I can not see the card view in pdf format, the show is a chaotic code like this picture: tab.jpg
if i display directly url like this
http://localhost/simrs/index.php/outpatientAdmission/patientCard?id=1 

then I'll get the results like this picture : card.jpg
please help me to solve this problem

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>