Problem with breezingforms, fpdf and image

I already have it resolved. In case anyone is interested, she left the part code. The operation is:

1-The visitor fills in a form with the bib number they wore in the race.
2-The form creates -by means of fpdf- a diploma in pdf, with the information of the career.

To do this, it consults the “jos_CarrerasDiplomas” table, from where it obtains the time, position, category… etc.

require_once(JPATH_ADMINISTRATOR.DS.’components/com_breezingforms/libraries/fpdf/fpdf.php’); $back = ff_getSubmit(‘back’); $db = &JFactory::getDBO(); $query=’select * from jos_CarrerasDiplomas where Dorsal=”.$dorsal; $db->setQuery($query); $result = $db->loadObject(); class PDF extends FPDF { // Header function Header( ) { // Logo $this->Image(“/home/ACCOUNTNAME/public_html/images/stories/diplomas/diploma-torreblanca12.jpg’,0,0,210); } // Footer function Footer() { } } $pdf=new PDF(); $pdf->AddPage(); $pdf->SetFont(‘Arial’,”,22); $pdf->SetTextColor(0, 0, 0); $pdf->SetY(210); $pdf->SetX(50); $pdf->Write(4,utf8_decode(“PARTICIPATION DIPLOMA”)); $pdf->Ln(15); $pdf->SetFont(‘Arial’,’B’,14); $pdf->Write(4,utf8_decode(“CEM JUMPING RIVER CERTIFIES THAT THE RUNNER:”)); $pdf->Ln(11); $pdf->SetX(20); $pdf->Write(4,utf8_decode($result->ParticipantName)); $pdf->SetFont(‘Arial’,”,13); $pdf->Ln(11); $pdf->Write(4,utf8_decode(“BOTH THE RACE NUMBER: “)); $pdf->SetX(120); $pdf->Write(4,utf8_decode($result->Back)); $pdf->Ln(8); $pdf->Write(4,utf8_decode(“IT HAS FINISHED THE COURSE IN A TEMPS OF: “)); $pdf->SetX(120); $pdf->Write(4,utf8_decode(date(“H:i:s”,strtotime($result->Time)) )); $pdf->Ln(8); $pdf->Write(4,utf8_decode(“GENERAL POSITION: “)); $pdf->SetX(120); $pdf->Write(4,utf8_decode($result->Pos)); $pdf->Ln(8); $pdf->Write(4,utf8_decode(“CATEGORY POSITION (“)); $pdf->Write(4,utf8_decode($result->Cat)); $pdf->Write(4,utf8_decode(“) : “)); $pdf->SetX(120); $pdf->Write(4,utf8_decode($result->PCat)); //Close and output PDF document $pdf->Output(JPATH_ADMINISTRATOR.DS.’components/com_breezingforms/images/report’.date(‘dm-Y_H-i-s’).’.pdf’); header(‘Location: administrator/components/com_breezingforms/images/report’.date(‘dm-Y_H-i-s’).’.pdf’);

All the best,
P

AnswerQuote

Answered : 05/01/2012 2:12 pm

See also  Problem when creating a multisite
Loading Facebook Comments ...
Loading Disqus Comments ...