note 14515 deleted from function.pdf-add-bookmark by didou

From: Date: Sat, 09 Aug 2003 03:29:38 +0000
Subject: note 14515 deleted from function.pdf-add-bookmark by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53728@lists.php.net to get a copy of this message
Note Submitter: bob@nijman.de ---- try this: <?php //Create & Open PDF-Object $pdf = pdf_new(); pdf_open_file($pdf); pdf_set_info($pdf, "Author","Bob Nijman"); pdf_begin_page($pdf, 300, 300); $bookmark = pdf_add_bookmark($pdf, "People"); pdf_add_bookmark($pdf, "Rasmus", $bookmark); pdf_set_font($pdf, "Helvetica", 20, "host"); $text = "This is R's page"; $width = pdf_stringwidth($pdf, $text); pdf_set_text_pos($pdf, (300-$width)/2, 100); pdf_show($pdf, $text); pdf_end_page($pdf); pdf_begin_page($pdf, 300, 300); $text = "This is T's page"; pdf_add_bookmark($pdf, "Thomas", $bookmark); $pdfimage = pdf_open_image_file($pdf, "jpeg", "test.jpg"); pdf_place_image($pdf, $pdfimage, 10, 100, 0.7); //close it up pdf_end_page($pdf); pdf_close($pdf); $data = pdf_get_buffer($pdf); header('Content-type: application/pdf'); header('Content-disposition: inline; filename=myTest.pdf'); header('Content-length: ' . strlen($data)); echo $data; ?>

« previous php.notes (#53728) next »