void pdf_close(int pdf document);
The PDF_close() function closes the pdf document.
Note: Due to an unclean implementation of the pdflib 0.6 the internal closing of the document also closes the file. This should not be done because pdflib did not open the file, but expects an already open file when PDF_open() is called. Consequently it shouldn't close the file. In order to fix this just take out line 190 of the file p_basic.c in the pdflib 0.6 source distribution until the next release of pdflib will fix this.
Note: This function works properly without any patches to pdflib if pdflib 2.0 support is activated.
See also PDF_open(), fclose().