$tfcreate_options[] = 'maxspacing=' . $_REQUEST['maxspacing']; $tfcreate_options[] = 'minspacing=' . $_REQUEST['minspacing']; $tfcreate_options[] = 'nofitlimit=' . $_REQUEST['nofitlimit']; $tfcreate_options[] = 'shrinklimit=' . $_REQUEST['shrinklimit']; $tfcreate_options[] = 'spreadlimit=' . $_REQUEST['spreadlimit']; $tfcreate_options[] = 'charspacing=' . $_REQUEST['charspacing']; $tffit_options = array('showborder=true'); $tf1 = $p->create_textflow($_REQUEST['text'], implode(' ', $tfcreate_options)); $tf2 = $p->create_textflow($_REQUEST['text'], implode(' ', $tfcreate_options)); $tf3 = $p->create_textflow($_REQUEST['text'], implode(' ', $tfcreate_options)); $tf4 = $p->create_textflow($_REQUEST['text'], implode(' ', $tfcreate_options)); $p->fit_textflow($tf1, 20, 20, 400, 580, implode(' ', $tffit_options)); $p->fit_textflow($tf2, 420, 20, 720, 580, implode(' ', $tffit_options)); $p->fit_textflow($tf3, 740, 20, 960, 580, implode(' ', $tffit_options)); $p->fit_textflow($tf4, 980, 20, 1080, 580, implode(' ', $tffit_options)); $p->delete_textflow($tf1); $p->delete_textflow($tf2); $p->delete_textflow($tf3); $p->delete_textflow($tf4); $tf = $p->create_textflow(implode(' ', $tfcreate_options), 'fontname=Helvetica fontsize=9 encoding=winansi'); $p->fit_textflow($tf, 5, 5, 1095, 18, implode(' ', $tffit_options)); $p->delete_textflow($tf); $p->end_page_ext(''); $p->end_document(''); $buf = $p->get_buffer(); $len = strlen($buf); header("Content-type: application/pdf"); header("Content-Length: {$len}"); header("Content-Disposition: inline; filename=hello.pdf"); print $buf; } catch (PDFlibException $e) {