$page_num = 1; while ($files[$counter] ne "") { print("Encoding $files[$counter] to PDF format\n"); open(INFILE, "$startdir/$files[$counter]"); $line=; while($line ne "") { $txt->translate($xc,$yc); $yc-=10; if($yc==0){ $pdf->page($page_count); $txt = $page->hybrid; $txt->textstart; $txt->font($fnt, 10); $page->mediabox('LETTER'); $yc=780; } $txt->text($line); $counter++; $line=; } }