Yii Framework Forum: pdf generated using fpdf is not opening in windows os - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

pdf generated using fpdf is not opening in windows os pdf is not opening in windows operating system Rate Topic: -----

#1 User is offline   vikram 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 24-June 09

  Posted 13 August 2009 - 06:00 AM

i have generated pdf using fpdf butit is not opening in windows could someone tell me were i missed it
thanks to the hearts that wishes to clear my doubt or to help me
vikram
0

#2 User is offline   ricardograna 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 376
  • Joined: 31-March 09
  • Location:Manaus/AM - Brazil

Posted 13 August 2009 - 09:52 PM

Detail to us you development environment and the relevant lines of your code.

I have no problems with Windows, except for caches.
Yes, It Is!
0

#3 User is offline   vikram 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 24-June 09

Posted 13 August 2009 - 11:42 PM

View Postrickgrana, on 13 August 2009 - 09:52 PM, said:

Detail to us you development environment and the relevant lines of your code.

I have no problems with Windows, except for caches.


Yii::import('application.extensions.fpdf.*');
require('fpdf.php');
if($result!=null)
{
$pdf=new FPDF();
$pdf->SetTitle("QuestionPaper",false);
$pdf->SetFont('Arial','B',16);
$pdf->AddPage();
$pdf->Cell(0,10,"Exam Type",0,0,'C',false);
$pdf->Ln();
$pdf->Cell(0,10,"Exam Name",0,0,'L',false);
$pdf->Cell(0,10,"Subject",0,0,'R',false);
$pdf->Ln();
$pdf->Cell(0,10,"Standard",0,0,'L',false);
$pdf->Cell(0,10,"Section",0,0,'R',false);
$pdf->Ln();
$pdf->Cell(0,10,"Date",0,0,'L',false);
$pdf->Cell(0,10,"TotalMarks",0,0,'R',false);
$pdf->Ln();

foreach($result as $key=>$value)
{
$pdf->SetFont('Arial','B',12);
$pdf->Cell(0,10,"$value[0]-marks('".$value[1]."')",0,0,'C',false,'');
$sno=1;

$pdf->SetFont('Arial','B',10);

for($k=2;$k<($value[1]+2);$k++)
{
$pdf->Ln();
if($sno<=9)
$pdf->Write(10,"0$sno.$value[$k]");
else
$pdf->Write(10,"$sno.$value[$k]");
$sno++;

}
$pdf->Ln();
}
$pdf->Output();
}


this is a view page and variables used here is sent from controller through render
thanks to the hearts that wishes to clear my doubt or to help me
vikram
0

#4 User is offline   Dave 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 187
  • Joined: 09-October 08

Posted 17 August 2009 - 03:21 AM

Is a pdf Viewer installed on windows? Do you send the correct headers? Which Browser are you using? Is is https?
0

#5 User is offline   vikram 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 60
  • Joined: 24-June 09

Posted 17 August 2009 - 05:22 AM

View PostDave, on 17 August 2009 - 03:21 AM, said:

Is a pdf Viewer installed on windows? Do you send the correct headers? Which Browser are you using? Is is https?

see i just executed the code shown above and i am using linux and after transferring it to windows it is not opening in it.......i think i am missing some lines of codes ............
thanks to the hearts that wishes to clear my doubt or to help me
vikram
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users