tailieunhanh - PHP Developer's Dictionary- P55

PHP Developer's Dictionary- P55:PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP brings together the best of Perl, C++, and other languages. | PHP Developer s Dictionary Syntax int cpdf_open int compression string filename Description The cpdf_open function which was added in PHP and PHP creates a new PDF document. A compression parameter value other than 0 indicates that compression should be used. The optional filename parameter names the file to which the contents should be written. By not specifying a filename you can have the document created in memory and then later decide to write it to a file or stream back to the client through standard out. Use cpdf_save_to_file to save a copy of the file and use cpdf_output_buffer to send the contents to standard out. The ClibPDF library does accept - as a filename parameter to indicate standard out but when PHP is used as an Apache module you must use the cpdf_output_buffer function instead of this shortcut. The return value is used as a handle to most other ClibPDF functions. cpdf_close Syntax void cpdf_close int pdf document Description The cpdf_close function which was added in PHP and PHP closes an active pdf document . Make sure to call this function when you have finished processing the PDF document because doing so releases all memory and file resources allocated by the library during processing. You also need to free any additional resources you created such as plots because this is not done automatically. cpdf_page_init Syntax void cpdf_page_init orientation double width double unit int pdf document height double int page number int Description IT-SC book 270 PHP Developer s Dictionary The cpdf_page_init function which was added in PHP and PHP initializes an individual page for writing. The pdf_document parameter is the handle returned from cpdf_open . The page_number parameter indicates the page to which you want to write. For a single-page document this should be 1 for a multipage document you can start with 1 or any larger number. The orientation parameter enables you to indicate whether the page should be .