Re[2]: [PHP-DEV] Re[2]: [PHP-CVS] cvs: php-src(PHP_4_3) /ext/pdf CREDITS config.m4 pdf.c pdf.dsp php_pdf.h

2004-09-13 Thread Rainer Schaaf
Hello,



Monday, September 13, 2004, 8:38:57 PM, you wrote:

 On Mon, 13 Sep 2004, Rainer Schaaf wrote:

   Derick assigned the  Bug #29297 to me and asked me to repair this.
   As it is already repaired in the main CVS (Wez moved the PDFlib
   extension a while ago to PECL), I thought the best solution would be
   to remove it here too and point to the PECL repository for people
   looking for this.

   But it looks like this was an bad idea, so what else should I do?

 Repairing != removing ;-)  I assigned it to you so that you could tweak
 the config.m4 to check for version 6 of the library, and bail out in
 case it found that version.

For me it was one possibility to repair it by removing it (giving the
hint where to find a substitution).

The other possibilities would be to merge the latest version from PECL
to PHP_4_3, or checking for PDFlib6 (and then consequently for PDFlib5
too, as this wrapper only supports PDFlib up to Version 4.x).

Merging the latest version from PECL would not be a solution, as it
only supports PDFlib 5/6 and not the older versions of PDFlib. This
would break the compatibility (In PECL we have to versions of the
PDFlib extension one for PDFlib 3/4 and one for PDFlib 5/6).

So I thought the best thing is to give the peoples the possibility
to choose the right thing and use the PECL extension they would like
to use.

I hope it is more clear now why I got the idea that removing is some
kind of repairing here.

As I did put pack the old version, the question remains on how to
solve the Bug #29297?




-- 
Best regards,

Rainer Schaaf   [EMAIL PROTECTED]http://www.pdflib.com
Personalize PDF: PDFlib Personalization Server and Block plugin
___PDFlib - a library for generating PDF on the fly

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] New PDFlib extension for PHP5

2004-05-24 Thread 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   [EMAIL PROTECTED]http://www.pdflib.com
Personalize PDF: PDFlib Personalization Server and Block plugin
___PDFlib - a library for generating PDF on the fly

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php