$pdf=new FPDF($orientation ,'mm','A4');
$pdf->open();
$pdf->addPage();
writePDF($pdf,$text);
Main Topics
Browse All TopicsLet's Say we have this:
$pdf = new FPDF();
then I have a function
function parse_pdf_info( $text,$indent=0 )
{
#Stuff
}
Then I have
parse_pdf_info($text);
How Do I use $pdf object inside the parse_pdf_info function?
Thanks!
Randy
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
stick to the global $pdf solution, because second solution is not good. you would get an object duplication, which is not what you want.
maybe something like this, if you really want to pass the object as parameter:
function parse_pdf_info(&$pdfvar, $text,$indent=0 )
{
#use $pdfvar
#Stuff
}
parse_pdf_info($pdf,$text)
>>because i may then duplicate the reference and store it somewhere else..
Exactly! :)
Evidently it implements a reference count system which actually causes passing by reference to be a performance loss in most cases.
I presume the performance gains by not dupping anything unless it has to, outways the loss of passing by reference.
I found this out awhile ago buried in the back of one of my php books. It was contributed to by Zeev Suraski so I assume it's trustworthy.
Finding good links has not been easy; this is the best i could do for now.
http://www.hudzilla.org/ph
http://us2.php.net/manual/
http://lists.nyphp.org/pip
Business Accounts
Answer for Membership
by: venkateshwarrPosted on 2005-02-16 at 22:52:21ID: 13332156
try this..
16);
com/includ e/fpdf/tut orial/ tuto 1.htm
<?php
require('fpdf.php');
$pdf=new FPDF();
$pdf->Open();
$pdf->AddPage();
$pdf->SetFont('Arial','B',
$pdf->Cell(0,100,$text);
$pdf->Output();
?>
http://pgsql.designmagick.