PHP Manual: cpdf_open
cpdf_open
Description
int cpdf_open ( int compression [, string filename [, array doc_limits]] )Opens a new PDF document.
Parameters
compressionIf different from 0, document compression is turned on
filenameSets the file in which the document is written. - is a synonym for stdout.
If omitted, the document is created in memory and can either be written into a file with cpdf_save_to_file() or written to standard output with cpdf_output_buffer().
Note: Using stdout will not work if PHP is compiled as an apache module. You can solve this problem by skipping this parameter filename and using cpdf_output_buffer() later to output the PDF document.
doc_limitsAn array defining the document limitation. See cpdf_global_set_document_limits() for more information
Return Values
Returns a document handle, needed as the first parameter for all other functions of the library.