On 3/18/07, Michael Pakay - www.NJCGL.com League Coordinator
<[EMAIL PROTECTED]> wrote:

> I do not have experience with link you include. I use fpdf which is
>  located at www.fpdf.org. This class has worked extremely well and has a
>  great forum, tutorial and manual. Give it a try and you won't be
>  disappointed.
>
>  Michael


Thanks... I'm half-way there (I think its half)....

Ive got a routine, to open several files, & extract the contents
(title etc)..  & I do get a PDF with 2 pages & titles..

However the body / text of the pages are missing....

(i'll work on it...)

===========================================

#list of files

$t[1]="../files/intro_imod.txt";
$t[2]="../files/bouncing.txt";

$pdf=new PDF();


foreach($t as $as => $ab){
# echo "'$as' '$ab'<BR>\n";

#Open up each file

$temp=file("$ab");

# reset title / text of each message

#Line counter = G

$g=0;
$title="";
$out="";

 foreach($temp as $ad => $ar){

if(!preg_match("/\w+/i",$ar)){$g=1;}


#Find title if no space/gap found in text...

if($g<1){
# echo "'$ad' '$ar'<BR>\n";
if(preg_match("/^\s*title:(.*)/i",$ar,$matches)){$title=$matches[1];}
}

# If its past the top of the file - Add the contents into $out (body)

if($g>0){
 $out.="$ar\n";
}



 }

if(preg_match("/\w+/i",$title)){
#echo "<BR><BR>TITLE $title<BR>\n";

$pdf->SetTitle($title);
$pdf->PrintChapter($as,'Big',$out);

#If there is a title - Create the page...

## ERROR HERE
#Title is set, but no $out / body set...

#i'll work on it - Im guessing its a simple error (ive tried with /
without single quotes


}



}
$pdf->Output();

Reply via email to