Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14629 invoked by uid 1010); 24 May 2004 10:26:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14595 invoked from network); 24 May 2004 10:26:44 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.185) by pb1.pair.com with SMTP; 24 May 2004 10:26:44 -0000 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BSCfL-00078q-00 for internals@lists.php.net; Mon, 24 May 2004 12:26:43 +0200 Received: from host-62-245-145-46.customer.m-online.net ([62.245.145.46] helo=localhost) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BSCfL-0006Lg-00; Mon, 24 May 2004 12:26:43 +0200 Date: Mon, 24 May 2004 12:27:55 +0200 Reply-To: Rainer Schaaf Organization: PDFlib GmbH X-Priority: 3 (Normal) Message-ID: <182521968109.20040524122755@pdflib.com> To: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:8924ccb81195195e31eb72e6f077ad0e Subject: New PDFlib extension for PHP5 From: rjs@pdflib.com (Rainer Schaaf) Hello, I'm maintaining the PDFlib wrapper code for the "pdf" extenions of PHP. I did a major rewrite of the wrapper for PDFlib 6 and PHP 5 and wanted to ask whether it is good idea to check in this code now (short before the release of PHP 5). My idea is to add this new Wrappercode as an extra module and keep the existing wrapper code for peoples using the old PDFlib 4 version. This is necessary because there are incompatible changes between PDFlib 4 and 5 which made a new wrapper module necessary. Here the details about the new wrapper code: This PDFlib Wrapper Code works with PDFlib 5 and higher. A new module was introduced, as PDFlib 5 supports a method to handle the special returnvalues needed for PHP in the PDFlib core now. This is necessary, as the new concept of optionlists in PDFlib allows to pass handles to PDFlib objects and filenames inside of optionlists. Before the wrapper added some offset to handles returned by PDFlib to fit into scheme used by php to return 0 in case of errors, whereas in PDFlib the errorcode is -1 and "0" is a valid handle. As the optionlist may contain filenames on various places the VIRTUAL_DIR support and the CHECK_OPEN_BASEDIR checks implemented in the wrapper will not work reliable too. So VIRTUAL_DIR support and the CHECK_OPEN_BASEDIR checking is disabled here too, as it would only work for some of the files used with PDFlib. The main changes: - only official PDFlib API's are included (exception pdf_open_memory_image) - supports PDFlib 5 and PDFlib 6 - builds with older PHP Version too (tested with PHP 4.1.0, 4.2.1, 4.3.0, and 5.0.0RC2.) - adds an Object Oriented API to PDFlib (for PHP 5 only) - uses PHP exceptions (for PHP 5 only) - disables VIRTUAL_DIR support (use SerachPath instead) - disables CHECK_OPEN_BASEDIR checks - changed old API's with varargs to only accept all args now I think it is worth to include this now, so that PHP5 comes with this new code, but I wanted to discuss this first. -- Best regards, Rainer Schaaf rjs@pdflib.com http://www.pdflib.com Personalize PDF: PDFlib Personalization Server and Block plugin _______PDFlib - a library for generating PDF on the fly________