cvs: /php3 ChangeLog /php3/functions pdf.c

From: Date: Tue, 17 Aug 1999 09:53:14 +0000
Subject: cvs: /php3 ChangeLog /php3/functions pdf.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-9907@lists.php.net to get a copy of this message
steinm Tue Aug 17 05:53:14 1999 EDT Modified files: /php3 ChangeLog /php3/functions pdf.c Log: added support for pdflib 2.01 Index: php3/ChangeLog diff -u php3/ChangeLog:1.739 php3/ChangeLog:1.740 --- php3/ChangeLog:1.739 Mon Aug 9 10:44:15 1999 +++ php3/ChangeLog Tue Aug 17 05:53:14 1999 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ???? ??, 1999, Version 3.0.13 +- pdflib 2.01 support (Uwe Steinmann) - fixed mem-leak in sysv-shm (Thies) - Add IMSP module (Chuck Hagenbuch) - Add gd-1.6.x PNG functions (Rasmus from drew@elysium.ltd.uk) Index: php3/functions/pdf.c diff -u php3/functions/pdf.c:1.44 php3/functions/pdf.c:1.45 --- php3/functions/pdf.c:1.44 Mon Aug 16 16:18:03 1999 +++ php3/functions/pdf.c Tue Aug 17 05:53:14 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdf.c,v 1.44 1999/08/16 20:18:03 rasmus Exp $ */ +/* $Id: pdf.c,v 1.45 1999/08/17 09:53:14 steinm Exp $ */ /* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE. Copyright (C) 1997 Thomas Merz. */ @@ -236,7 +236,12 @@ /* need to use a PHPAPI function here because it is external module in windows */ #if HAVE_PDFLIB2 php3_printf("pdflib %d.%d", PDF_get_majorversion(), PDF_get_minorversion()); +#if PDFLIB_MINORVERSION > 0 + php3_printf("The function pdf_put_image() and pdf_execute_image() are <B>not</B> available"); #else + php3_printf("The function pdf_put_image() and pdf_execute_image() are available"); +#endif +#else php3_printf("%s. AFM files in %s", PDFLIB_VERSION, PDF_DEFAULT_FONT_PATH); #endif } @@ -2251,7 +2256,11 @@ } +#if PDFLIB_MINORVERSION == 0 pdf_image = PDF_open_memory_image(pdf, buffer, im->sx, im->sy, 3, 8); +#else + pdf_image = PDF_open_image(pdf, "raw", "memory", buffer, im->sx*im->sy*3, im->sx, im->sy, 3, 8, NULL); +#endif if(0 > pdf_image) { php3_error(E_WARNING, "Could not open image"); @@ -2383,6 +2392,12 @@ PDF *pdf; PDF_TLS_VARS; +#if HAVE_PDFLIB2 +#if PDFLIB_MINORVERSION > 0 + php_printf(E_WARNING, "Version 2.01 of pdflib does not need the pdf_put_image() anymore, check the docs!"); + RETURN_TRUE; +#endif +#endif if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) { WRONG_PARAM_COUNT; } @@ -2427,6 +2442,12 @@ PDF *pdf; PDF_TLS_VARS; +#if HAVE_PDFLIB2 +#if PDFLIB_MINORVERSION >= 01 + php_printf(E_WARNING, "Version 2.01 of pdflib does not need the pdf_execute_image() anymore, check the docs!"); + RETURN_TRUE; +#endif +#endif if (ARG_COUNT(ht) != 5 || getParameters(ht, 5, &arg1, &arg2, &arg3, &arg4, &arg5) == FAILURE) { WRONG_PARAM_COUNT; }

« previous php.dev (#9907) next »