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 picture2338
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 2341
please help me to solve this problem