All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
  Print view

pdf
Author Message
PostPosted: Sun Jul 01, 2007 5:27 am 
Offline

Joined: Tue Jun 19, 2007 2:53 am
Posts: 12
hi,
i still don't understand how to print in PDF format??please somebody display a simple step how to print..actually i want to print invoice, i'd saw the example but still can't do..i also try this exampe PDF Invoices and Quotes Development in ATK Part 1 but its complex for me

http://www.achievo.org/forum/viewtopic. ... ight=print :cry:


Top
 Profile  
 

PostPosted: Sun Jul 01, 2007 8:56 am 
Regular
Offline

Joined: Wed Oct 19, 2005 4:25 am
Posts: 26
Location: Malaysia
Firstly you must have fpdf class. Download at www.fpdf.org

This is my step.
1- Create action button for view your pdf.

2- I have create some class that extends fpdf class (for setting header and footer), like this

Code:
include_once(moduleDir("report")."fpdf.php");
class categorysummary extends FPDF
{
function Footer(){
 //write your footer
}

function Header(){
 //write your header
}

}


3- On main of your class.
Code:
include_once(moduleDir("report")."categorysummary .php");
   
class categoryreport extends atkNode
  {

  function action_search(){
  .....
  $this->pdfplan();
  }
  function pdfplan(){      
       $pdf=new categorysummary ('L','mm','A4');
       $pdf->AddPage();
       $pdf->SetFont('Arial','B',8);
       $pdf->Cell(280,5,"Hello ATK",0,1,'L');
       $pdf->Output();
       $pdf->closeParsers();
       exit();
  }
}


Top
 Profile  
 

thans
PostPosted: Mon Jul 02, 2007 5:10 am 
Offline

Joined: Tue Jun 19, 2007 2:53 am
Posts: 12
thanks..if i want to search using order_no then print..wat can i do?please display the code if can..
:)


Top
 Profile  
 

PostPosted: Mon Jul 02, 2007 5:41 am 
Regular
Offline

Joined: Wed Oct 19, 2005 4:25 am
Posts: 26
Location: Malaysia
You can query using http://www.achievo.org/wiki/Database_Access
insert on
Code:
function pdfplan(){   
......


Top
 Profile  
 

thanks
PostPosted: Mon Jul 09, 2007 5:51 am 
Offline

Joined: Tue Jun 19, 2007 2:53 am
Posts: 12
thanks... :D


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group