cvs commit
| From: | steinm | Date: | Mon, 05 Jul 1999 16:16:33 +0000 |
| Subject: | cvs commit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8104@lists.php.net to get a copy of this message | ||
From: steinm
Date: Mon Jul 5 16:16:33 1999
Modified files:
php3/functions/pdf.c
php3/functions/php3_pdf.h
Log message:
- more functions, change function headers
Index: php3/functions/pdf.c
diff -u php3/functions/pdf.c:1.38 php3/functions/pdf.c:1.39
--- php3/functions/pdf.c:1.38 Mon Jul 5 11:17:36 1999
+++ php3/functions/pdf.c Mon Jul 5 16:16:33 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pdf.c,v 1.38 1999/07/05 15:17:36 steinm Exp $ */
+/* $Id: pdf.c,v 1.39 1999/07/05 20:16:33 steinm Exp $ */
/* pdflib 0.6 is subject to the ALADDIN FREE PUBLIC LICENSE.
Copyright (C) 1997 Thomas Merz. */
@@ -78,89 +78,94 @@
#else
# define PDF_GLOBAL(a) a
# define PDF_TLS_VARS
-int le_pdf_image;
+static int le_pdf_image;
#if HAVE_PDFLIB2
-int le_outline;
+static int le_outline;
#else
-int le_pdf_info;
+static int le_pdf_info;
#endif
-int le_pdf;
+static int le_pdf;
#endif
function_entry pdf_functions[] = {
#if HAVE_PDFLIB2
#else
- {"pdf_get_info", php3_pdf_get_info, NULL},
+ PHP_FE(pdf_get_info, NULL)
#endif
- {"pdf_set_info_creator", php3_pdf_set_info_creator, NULL},
- {"pdf_set_info_title", php3_pdf_set_info_title, NULL},
- {"pdf_set_info_subject", php3_pdf_set_info_subject, NULL},
- {"pdf_set_info_author", php3_pdf_set_info_author, NULL},
- {"pdf_set_info_keywords", php3_pdf_set_info_keywords, NULL},
- {"pdf_open", php3_pdf_open, NULL},
- {"pdf_close", php3_pdf_close, NULL},
- {"pdf_begin_page", php3_pdf_begin_page, NULL},
- {"pdf_end_page", php3_pdf_end_page, NULL},
- {"pdf_show", php3_pdf_show, NULL},
- {"pdf_show_xy", php3_pdf_show_xy, NULL},
- {"pdf_set_font", php3_pdf_set_font, NULL},
- {"pdf_set_leading", php3_pdf_set_leading, NULL},
- {"pdf_set_text_rendering", php3_pdf_set_text_rendering,NULL},
- {"pdf_set_horiz_scaling", php3_pdf_set_horiz_scaling, NULL},
- {"pdf_set_text_rise", php3_pdf_set_text_rise, NULL},
- {"pdf_set_text_matrix", php3_pdf_set_text_matrix, NULL},
- {"pdf_set_text_pos", php3_pdf_set_text_pos, NULL},
- {"pdf_set_char_spacing", php3_pdf_set_char_spacing, NULL},
- {"pdf_set_word_spacing", php3_pdf_set_word_spacing, NULL},
- {"pdf_continue_text", php3_pdf_continue_text, NULL},
- {"pdf_stringwidth", php3_pdf_stringwidth, NULL},
- {"pdf_save", php3_pdf_save, NULL},
- {"pdf_restore", php3_pdf_restore, NULL},
- {"pdf_translate", php3_pdf_translate, NULL},
- {"pdf_scale", php3_pdf_scale, NULL},
- {"pdf_rotate", php3_pdf_rotate, NULL},
- {"pdf_setflat", php3_pdf_setflat, NULL},
- {"pdf_setlinejoin", php3_pdf_setlinejoin, NULL},
- {"pdf_setlinecap", php3_pdf_setlinecap, NULL},
- {"pdf_setmiterlimit", php3_pdf_setmiterlimit, NULL},
- {"pdf_setlinewidth", php3_pdf_setlinewidth, NULL},
- {"pdf_setdash", php3_pdf_setdash, NULL},
- {"pdf_moveto", php3_pdf_moveto, NULL},
- {"pdf_lineto", php3_pdf_lineto, NULL},
- {"pdf_curveto", php3_pdf_curveto, NULL},
- {"pdf_circle", php3_pdf_circle, NULL},
- {"pdf_arc", php3_pdf_arc, NULL},
- {"pdf_rect", php3_pdf_rect, NULL},
- {"pdf_closepath", php3_pdf_closepath, NULL},
- {"pdf_stroke", php3_pdf_stroke, NULL},
- {"pdf_closepath_stroke", php3_pdf_closepath_stroke, NULL},
- {"pdf_fill", php3_pdf_fill, NULL},
- {"pdf_fill_stroke", php3_pdf_fill_stroke, NULL},
- {"pdf_closepath_fill_stroke", php3_pdf_closepath_fill_stroke, NULL},
- {"pdf_endpath", php3_pdf_endpath, NULL},
- {"pdf_clip", php3_pdf_clip, NULL},
- {"pdf_setgray_fill", php3_pdf_setgray_fill, NULL},
- {"pdf_setgray_stroke", php3_pdf_setgray_stroke, NULL},
- {"pdf_setgray", php3_pdf_setgray, NULL},
- {"pdf_setrgbcolor_fill", php3_pdf_setrgbcolor_fill, NULL},
- {"pdf_setrgbcolor_stroke", php3_pdf_setrgbcolor_stroke,NULL},
- {"pdf_setrgbcolor", php3_pdf_setrgbcolor, NULL},
- {"pdf_add_outline", php3_pdf_add_outline, NULL},
- {"pdf_set_transition", php3_pdf_set_transition, NULL},
- {"pdf_set_duration", php3_pdf_set_duration, NULL},
- {"pdf_open_jpeg", php3_pdf_open_jpeg, NULL},
+ PHP_FE(pdf_set_info_creator, NULL)
+ PHP_FE(pdf_set_info_title, NULL)
+ PHP_FE(pdf_set_info_subject, NULL)
+ PHP_FE(pdf_set_info_author, NULL)
+ PHP_FE(pdf_set_info_keywords, NULL)
+ PHP_FE(pdf_open, NULL)
+ PHP_FE(pdf_close, NULL)
+ PHP_FE(pdf_begin_page, NULL)
+ PHP_FE(pdf_end_page, NULL)
+ PHP_FE(pdf_show, NULL)
+ PHP_FE(pdf_show_xy, NULL)
+ PHP_FE(pdf_set_font, NULL)
+ PHP_FE(pdf_set_leading, NULL)
+ PHP_FE(pdf_set_text_rendering, NULL)
+ PHP_FE(pdf_set_horiz_scaling, NULL)
+ PHP_FE(pdf_set_text_rise, NULL)
+ PHP_FE(pdf_set_text_matrix, NULL)
+ PHP_FE(pdf_set_text_pos, NULL)
+ PHP_FE(pdf_set_char_spacing, NULL)
+ PHP_FE(pdf_set_word_spacing, NULL)
+ PHP_FE(pdf_continue_text, NULL)
+ PHP_FE(pdf_stringwidth, NULL)
+ PHP_FE(pdf_save, NULL)
+ PHP_FE(pdf_restore, NULL)
+ PHP_FE(pdf_translate, NULL)
+ PHP_FE(pdf_scale, NULL)
+ PHP_FE(pdf_rotate, NULL)
+ PHP_FE(pdf_setflat, NULL)
+ PHP_FE(pdf_setlinejoin, NULL)
+ PHP_FE(pdf_setlinecap, NULL)
+ PHP_FE(pdf_setmiterlimit, NULL)
+ PHP_FE(pdf_setlinewidth, NULL)
+ PHP_FE(pdf_setdash, NULL)
+ PHP_FE(pdf_moveto, NULL)
+ PHP_FE(pdf_lineto, NULL)
+ PHP_FE(pdf_curveto, NULL)
+ PHP_FE(pdf_circle, NULL)
+ PHP_FE(pdf_arc, NULL)
+ PHP_FE(pdf_rect, NULL)
+ PHP_FE(pdf_closepath, NULL)
+ PHP_FE(pdf_stroke, NULL)
+ PHP_FE(pdf_closepath_stroke, NULL)
+ PHP_FE(pdf_fill, NULL)
+ PHP_FE(pdf_fill_stroke, NULL)
+ PHP_FE(pdf_closepath_fill_stroke, NULL)
+ PHP_FE(pdf_endpath, NULL)
+ PHP_FE(pdf_clip, NULL)
+ PHP_FE(pdf_setgray_fill, NULL)
+ PHP_FE(pdf_setgray_stroke, NULL)
+ PHP_FE(pdf_setgray, NULL)
+ PHP_FE(pdf_setrgbcolor_fill, NULL)
+ PHP_FE(pdf_setrgbcolor_stroke, NULL)
+ PHP_FE(pdf_setrgbcolor, NULL)
+ PHP_FE(pdf_add_outline, NULL)
+ PHP_FE(pdf_set_transition, NULL)
+ PHP_FE(pdf_set_duration, NULL)
+ PHP_FE(pdf_open_jpeg, NULL)
#if HAVE_LIBGD13 && HAVE_PDFLIB2
- {"pdf_open_memory_image", php3_pdf_open_memory_image, NULL},
+ PHP_FE(pdf_open_memory_image, NULL)
#endif
- {"pdf_open_gif", php3_pdf_open_gif, NULL},
- {"pdf_close_image", php3_pdf_close_image, NULL},
- {"pdf_place_image", php3_pdf_place_image, NULL},
- {"pdf_put_image", php3_pdf_put_image, NULL},
- {"pdf_execute_image", php3_pdf_execute_image, NULL},
- {"pdf_add_weblink", php3_pdf_add_weblink, NULL},
- {"pdf_add_annotation", php3_pdf_add_annotation, NULL},
- {"pdf_set_border_style", php3_pdf_set_border_style, NULL},
- {"pdf_set_border_color", php3_pdf_set_border_color, NULL},
+ PHP_FE(pdf_open_gif, NULL)
+ PHP_FE(pdf_close_image, NULL)
+ PHP_FE(pdf_place_image, NULL)
+ PHP_FE(pdf_put_image, NULL)
+ PHP_FE(pdf_execute_image, NULL)
+#if HAVE_PDFLIB2
+ PHP_FE(pdf_add_weblink, NULL)
+ PHP_FE(pdf_add_pdflink, NULL)
+ PHP_FE(pdf_add_annotation, NULL)
+ PHP_FE(pdf_set_border_style, NULL)
+ PHP_FE(pdf_set_border_color, NULL)
+ PHP_FE(pdf_get_image_height, NULL)
+ PHP_FE(pdf_get_image_width, NULL)
+#endif
{NULL, NULL, NULL}
};
@@ -229,7 +234,7 @@
return SUCCESS;
}
-void php3_info_pdf(void) {
+void php3_info_pdf() {
/* 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());
@@ -246,7 +251,7 @@
#else
/* {{{ proto int pdf_get_info(void)
Returns a default info structure for a pdf document */
-void php3_pdf_get_info(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_get_info) {
PDF_info *pdf_info=NULL;
int id;
PDF_TLS_VARS;
@@ -274,7 +279,7 @@
/* {{{ proto pdf_set_info_creator(int info, string creator)
Fills the creator field of the info structure */
-void php3_pdf_set_info_creator(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_creator) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -315,7 +320,7 @@
/* {{{ proto pdf_set_info_title(int info, string title)
Fills the title field of the info structure */
-void php3_pdf_set_info_title(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_title) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -356,7 +361,7 @@
/* {{{ proto pdf_set_info_subject(int info, string subject)
Fills the subject field of the info structure */
-void php3_pdf_set_info_subject(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_subject) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -397,7 +402,7 @@
/* {{{ proto pdf_set_info_author(int info, string author)
Fills the author field of the info structure */
-void php3_pdf_set_info_author(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_author) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -438,7 +443,7 @@
/* {{{ proto pdf_set_info_keywords(int info, string keywords)
Fills the keywords field of the info structure */
-void php3_pdf_set_info_keywords(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_info_keywords) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -479,7 +484,7 @@
/* {{{ proto int pdf_open(int filedesc, int info)
Opens a new pdf document */
-void php3_pdf_open(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_open) {
pval *file;
pval *info;
int id, type;
@@ -548,7 +553,7 @@
/* {{{ proto void pdf_close(int pdfdoc)
Closes the pdf document */
-void php3_pdf_close(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_close) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -574,7 +579,7 @@
/* {{{ proto void pdf_begin_page(int pdfdoc, double height, double width)
Starts page */
-void php3_pdf_begin_page(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_begin_page) {
pval *arg1, *arg2, *arg3;
int id, type;
double height, width;
@@ -605,7 +610,7 @@
/* {{{ proto void pdf_end_page(int pdfdoc)
Ends page */
-void php3_pdf_end_page(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_end_page) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -631,7 +636,7 @@
/* {{{ proto void pdf_show(int pdfdoc, string text)
Output text at current position */
-void php3_pdf_show(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_show) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -658,7 +663,7 @@
/* {{{ proto void pdf_show_xy(int pdfdoc, string text, double x-koor, double y-koor)
Output text at position */
-void php3_pdf_show_xy(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_show_xy) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -687,7 +692,7 @@
/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, int encoding)
Select the current font face, size and encoding */
-void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_font) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -744,7 +749,7 @@
/* {{{ proto void pdf_set_leading(int pdfdoc, double distance)
Sets distance between text lines */
-void php3_pdf_set_leading(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_leading) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -771,7 +776,7 @@
/* {{{ proto void pdf_set_text_rendering(int pdfdoc, int mode)
Determines how text is rendered */
-void php3_pdf_set_text_rendering(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_rendering) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -802,7 +807,7 @@
/* {{{ proto void pdf_set_horiz_scaling(int pdfdoc, double scale)
Sets horizontal scaling of text */
-void php3_pdf_set_horiz_scaling(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_horiz_scaling) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -829,7 +834,7 @@
/* {{{ proto void pdf_set_text_rise(int pdfdoc, double value)
Sets the text rise */
-void php3_pdf_set_text_rise(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_rise) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -856,7 +861,7 @@
/* {{{ proto void pdf_set_text_matrix(int pdfdoc, arry matrix)
Sets the text matrix */
-void php3_pdf_set_text_matrix(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_matrix) {
pval *arg1, *arg2, *data;
int id, type, i;
HashTable *matrix;
@@ -916,7 +921,7 @@
/* {{{ proto void pdf_set_text_pos(int pdfdoc, double x, double y)
??? */
-void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_text_pos) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -944,7 +949,7 @@
/* {{{ proto void pdf_set_char_spacing(int pdfdoc, double space)
Sets character spacing */
-void php3_pdf_set_char_spacing(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_char_spacing) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -971,7 +976,7 @@
/* {{{ proto void pdf_set_word_spacing(int pdfdoc, double space)
Sets spacing between words */
-void php3_pdf_set_word_spacing(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_word_spacing) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -998,7 +1003,7 @@
/* {{{ proto void pdf_continue_text(int pdfdoc, string text)
Output text in next line */
-void php3_pdf_continue_text(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_continue_text) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1025,7 +1030,7 @@
/* {{{ proto double pdf_stringwidth(int pdfdoc, string text)
Returns width of text in current font*/
-void php3_pdf_stringwidth(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_stringwidth) {
pval *arg1, *arg2;
int id, type;
double width;
@@ -1057,7 +1062,7 @@
/* {{{ proto void pdf_save(int pdfdoc)
Saves current enviroment */
-void php3_pdf_save(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_save) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1083,7 +1088,7 @@
/* {{{ proto void pdf_restore(int pdfdoc)
Restores formerly saved enviroment */
-void php3_pdf_restore(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_restore) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1109,7 +1114,7 @@
/* {{{ proto void pdf_translate(int pdfdoc, double x, double y)
Sets origin of coordinate system */
-void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_translate) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -1137,7 +1142,7 @@
/* {{{ proto void pdf_scale(int pdfdoc, double x-scale, double y-scale)
Sets scaling */
-void php3_pdf_scale(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_scale) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -1165,7 +1170,7 @@
/* {{{ proto void pdf_rotate(int pdfdoc, double angle)
Sets rotation */
-void php3_pdf_rotate(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_rotate) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1192,7 +1197,7 @@
/* {{{ proto void pdf_setflat(int pdfdoc, double value)
Sets flatness */
-void php3_pdf_setflat(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setflat) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1224,7 +1229,7 @@
/* {{{ proto void pdf_setlinejoin(int pdfdoc, int value)
Sets linejoin parameter */
-void php3_pdf_setlinejoin(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinejoin) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1260,7 +1265,7 @@
/* {{{ proto void pdf_setlinecap(int pdfdoc, int value)
Sets linecap parameter */
-void php3_pdf_setlinecap(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinecap) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1296,7 +1301,7 @@
/* {{{ proto void pdf_setmiterlimit(int pdfdoc, double value)
Sets miter limit */
-void php3_pdf_setmiterlimit(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setmiterlimit) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1328,7 +1333,7 @@
/* {{{ proto void pdf_setlinewidth(int pdfdoc, double width)
Sets line width */
-void php3_pdf_setlinewidth(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setlinewidth) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1355,7 +1360,7 @@
/* {{{ proto void pdf_setdash(int pdfdoc, double white, double black)
Sets dash pattern */
-void php3_pdf_setdash(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setdash) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -1383,7 +1388,7 @@
/* {{{ proto void pdf_moveto(int pdfdoc, double x, double y)
Sets current point */
-void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_moveto) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -1411,7 +1416,7 @@
/* {{{ proto void pdf_curveto(int pdfdoc, double x1, double y1, double x2, double y2, double x3,
double y3)
Draws a curve */
-void php3_pdf_curveto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_curveto) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7;
int id, type;
PDF *pdf;
@@ -1448,7 +1453,7 @@
/* {{{ proto void pdf_lineto(int pdfdoc, double x, double y)
Draws a line */
-void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_lineto) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -1476,7 +1481,7 @@
/* {{{ proto void pdf_circle(int pdfdoc, double x, double y, double radius)
Draws a circle */
-void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_circle) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -1505,7 +1510,7 @@
/* {{{ proto void pdf_arc(int pdfdoc, double x, double y, double radius, double start, double end)
Draws an arc */
-void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_arc) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
int id, type;
PDF *pdf;
@@ -1536,7 +1541,7 @@
/* {{{ proto void pdf_rect(int pdfdoc, double x, double y, double width, double height)
Draws a rectangle */
-void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_rect) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
int id, type;
PDF *pdf;
@@ -1569,7 +1574,7 @@
/* {{{ proto void pdf_closepath(int pdfdoc)
Close path */
-void php3_pdf_closepath(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1595,7 +1600,7 @@
/* {{{ proto void pdf_closepath_stroke(int pdfdoc)
Close path and draw line along path */
-void php3_pdf_closepath_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1621,7 +1626,7 @@
/* {{{ proto void pdf_stroke(int pdfdoc)
Draw line along path path */
-void php3_pdf_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1647,7 +1652,7 @@
/* {{{ proto void pdf_fill(int pdfdoc)
Fill current path */
-void php3_pdf_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_fill) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1673,7 +1678,7 @@
/* {{{ proto void pdf_fill_stroke(int pdfdoc)
Fill and stroke current path */
-void php3_pdf_fill_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_fill_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1699,7 +1704,7 @@
/* {{{ proto void pdf_closepath_fill_stroke(int pdfdoc)
Close, fill and stroke current path */
-void php3_pdf_closepath_fill_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_closepath_fill_stroke) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1725,7 +1730,7 @@
/* {{{ proto void pdf_endpath(int pdfdoc)
Ends current path */
-void php3_pdf_endpath(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_endpath) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1751,7 +1756,7 @@
/* {{{ proto void pdf_clip(int pdfdoc)
Clips to current path */
-void php3_pdf_clip(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_clip) {
pval *arg1;
int id, type;
PDF *pdf;
@@ -1777,7 +1782,7 @@
/* {{{ proto void pdf_setgray_fill(int pdfdoc, double value)
Sets filling color to gray value */
-void php3_pdf_setgray_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray_fill) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1804,7 +1809,7 @@
/* {{{ proto void pdf_setgray_stroke(int pdfdoc, double value)
Sets drawing color to gray value */
-void php3_pdf_setgray_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray_stroke) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1831,7 +1836,7 @@
/* {{{ proto void pdf_setgray(int pdfdoc, double value)
Sets drawing and filling color to gray value */
-void php3_pdf_setgray(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setgray) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -1858,7 +1863,7 @@
/* {{{ proto void pdf_setrgbcolor_fill(int pdfdoc, double red, double green, double blue)
Sets filling color to rgb color value */
-void php3_pdf_setrgbcolor_fill(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor_fill) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -1887,7 +1892,7 @@
/* {{{ proto void pdf_setrgbcolor_stroke(int pdfdoc, double red, double green, double blue)
Sets drawing color to rgb color value */
-void php3_pdf_setrgbcolor_stroke(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor_stroke) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -1916,7 +1921,7 @@
/* {{{ proto void pdf_setrgbcolor(int pdfdoc, double red, double green, double blue)
Sets drawing and filling color to rgb color value */
-void php3_pdf_setrgbcolor(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_setrgbcolor) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -1945,7 +1950,7 @@
/* {{{ proto void pdf_add_outline(int pdfdoc, string text, int parent, int open);
Add bookmark for current page */
-void php3_pdf_add_outline(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_add_outline) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
int *outline, *parent;
@@ -2000,7 +2005,7 @@
/* {{{ proto void pdf_set_transition(int pdfdoc, int transition)
Sets transition between pages */
-void php3_pdf_set_transition(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_transition) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -2059,7 +2064,7 @@
/* {{{ proto void pdf_set_duration(int pdfdoc, double duration)
Sets duration between pages */
-void php3_pdf_set_duration(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_duration) {
pval *arg1, *arg2;
int id, type;
PDF *pdf;
@@ -2086,7 +2091,7 @@
/* {{{ proto int pdf_open_gif(int pdf, string giffile)
Opens a gif file and returns an image for placement in a pdf document */
-void php3_pdf_open_gif(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_open_gif) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -2124,7 +2129,7 @@
/* {{{ proto int pdf_open_jpeg(int pdf, string jpegfile)
Opens a jpeg file and returns an image for placement in a pdf document */
-void php3_pdf_open_jpeg(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_open_jpeg) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -2163,7 +2168,7 @@
#if HAVE_PDFLIB2
/* {{{ proto int pdf_open_memory_image(int pdf, int image)
Takes an gd image and returns an image for placement in a pdf document */
-void php3_pdf_open_memory_image(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_open_memory_image) {
pval *argv[2];
int argc;
int i, j, id, gid, type, color, count;
@@ -2223,7 +2228,7 @@
/* {{{ proto void pdf_close_image(int pdfimage)
Closes the pdf image */
-void php3_pdf_close_image(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_close_image) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -2280,7 +2285,7 @@
/* {{{ proto void pdf_place_image(int pdf, int pdfimage, int x, int y, int scale)
Places image in the pdf document */
-void php3_pdf_place_image(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_place_image) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
int id, type;
#if HAVE_PDFLIB2
@@ -2328,7 +2333,7 @@
/* {{{ proto void pdf_put_image(int pdf, int pdfimage)
Stores image in the pdf document for later use */
-void php3_pdf_put_image(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_put_image) {
pval *arg1, *arg2;
int id, type;
#if HAVE_PDFLIB2
@@ -2372,7 +2377,7 @@
/* {{{ proto void pdf_execute_image(int pdf, int pdfimage, int x, int y, int scale)
Places stored image in the pdf document */
-void php3_pdf_execute_image(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_execute_image) {
pval *arg1, *arg2, *arg3, *arg4, *arg5;
int id, type;
#if HAVE_PDFLIB2
@@ -2418,9 +2423,82 @@
}
/* }}} */
+#if HAVE_PDFLIB2
+/* {{{ proto void pdf_get_image_width(int pdf, int pdfimage)
+ Returns the width of an image */
+PHP_FUNCTION(pdf_get_image_width) {
+ pval *arg1, *arg2;
+ int id, type;
+ int width;
+ int pdf_image;
+ PDF *pdf;
+ PDF_TLS_VARS;
+
+ if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long(arg1);
+ id=arg1->value.lval;
+ pdf = php3_list_find(id,&type);
+ if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
+ php3_error(E_WARNING,"Unable to find identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ convert_to_long(arg2);
+ id=arg2->value.lval;
+ pdf_image = (int) php3_list_find(id,&type);
+ if(pdf_image < 0 || type!=PDF_GLOBAL(le_pdf_image)) {
+ php3_error(E_WARNING,"Unable to find identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ width = PDF_get_image_width(pdf, pdf_image);
+
+ RETURN_LONG(width);
+}
+/* }}} */
+
+/* {{{ proto void pdf_get_image_height(int pdf, int pdfimage)
+ Returns the height of an image */
+PHP_FUNCTION(pdf_get_image_height) {
+ pval *arg1, *arg2;
+ int id, type;
+ int height;
+ int pdf_image;
+ PDF *pdf;
+ PDF_TLS_VARS;
+
+ if (ARG_COUNT(ht) != 2 || getParameters(ht, 2, &arg1, &arg2) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long(arg1);
+ id=arg1->value.lval;
+ pdf = php3_list_find(id,&type);
+ if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
+ php3_error(E_WARNING,"Unable to find identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ convert_to_long(arg2);
+ id=arg2->value.lval;
+ pdf_image = (int) php3_list_find(id,&type);
+ if(pdf_image < 0 || type!=PDF_GLOBAL(le_pdf_image)) {
+ php3_error(E_WARNING,"Unable to find identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ height = PDF_get_image_height(pdf, pdf_image);
+
+ RETURN_LONG(height);
+}
+/* }}} */
+
/* {{{ proto void pdf_add_weblink(int pdfdoc, double llx, double lly, double urx, double ury,
string url)
Adds link to web resource */
-void php3_pdf_add_weblink(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_add_weblink) {
pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6;
int id, type;
PDF *pdf;
@@ -2449,9 +2527,42 @@
}
/* }}} */
+/* {{{ proto void pdf_add_pdflink(int pdfdoc, double llx, double lly, double urx, double ury,
string filename, int page, string dest)
+ Adds link to pdf document */
+PHP_FUNCTION(pdf_add_pdflink) {
+ pval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7, *arg8;
+ int id, type;
+ PDF *pdf;
+ PDF_TLS_VARS;
+
+ if (ARG_COUNT(ht) != 8 || getParameters(ht, 8, &arg1, &arg2, &arg3, &arg4,
&arg5, &arg6, &arg7, &arg8) == FAILURE) {
+ WRONG_PARAM_COUNT;
+ }
+
+ convert_to_long(arg1);
+ convert_to_double(arg2);
+ convert_to_double(arg3);
+ convert_to_double(arg4);
+ convert_to_double(arg5);
+ convert_to_string(arg6);
+ convert_to_long(arg7);
+ convert_to_string(arg8);
+ id=arg1->value.lval;
+ pdf = php3_list_find(id,&type);
+ if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
+ php3_error(E_WARNING,"Unable to find file identifier %d",id);
+ RETURN_FALSE;
+ }
+
+ PDF_add_pdflink(pdf, (float) arg2->value.dval, (float) arg3->value.dval, (float)
arg4->value.dval, (float) arg5->value.dval, arg6->value.str.val, arg7->value.lval,
arg8->value.str.val);
+
+ RETURN_TRUE;
+}
+/* }}} */
+
/* {{{ proto void pdf_set_border_style(int pdfdoc, string style, double width)
Set style of box surounded weblinks */
-void php3_pdf_set_border_style(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_border_style) {
pval *arg1, *arg2, *arg3;
int id, type;
PDF *pdf;
@@ -2479,7 +2590,7 @@
/* {{{ proto void pdf_set_border_color(int pdfdoc, double red, double green, double blue)
Set color of box surounded weblinks */
-void php3_pdf_set_border_color(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_set_border_color) {
pval *arg1, *arg2, *arg3, *arg4;
int id, type;
PDF *pdf;
@@ -2508,7 +2619,7 @@
/* {{{ proto void pdf_add_annotation(int pdfdoc, double xll, double yll, double xur, double xur,
string title, string text)
Sets annotation */
-void php3_pdf_add_annotation(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(pdf_add_annotation) {
pval *argv[11];
int id, type, argc;
PDF *pdf;
@@ -2534,7 +2645,7 @@
RETURN_FALSE;
}
- PDF_add_note(argv[0]->value.lval,
+ PDF_add_note(pdf,
(float) argv[1]->value.dval,
(float) argv[2]->value.dval,
(float) argv[3]->value.dval,
@@ -2546,6 +2657,7 @@
RETURN_TRUE;
}
/* }}} */
+#endif /* HAVE_PDFLIB2 */
#endif
Index: php3/functions/php3_pdf.h
diff -u php3/functions/php3_pdf.h:1.12 php3/functions/php3_pdf.h:1.13
--- php3/functions/php3_pdf.h:1.12 Mon Jul 5 11:17:36 1999
+++ php3/functions/php3_pdf.h Mon Jul 5 16:16:33 1999
@@ -26,7 +26,7 @@
| Authors: Uwe Steinmann |
+----------------------------------------------------------------------+
*/
-/* $Id: php3_pdf.h,v 1.12 1999/07/05 15:17:36 steinm Exp $ */
+/* $Id: php3_pdf.h,v 1.13 1999/07/05 20:16:33 steinm Exp $ */
#ifndef _PHP3_PDF_H
#define _PHP3_PDF_H
@@ -49,77 +49,82 @@
extern int php3_mend_pdf(void);
#if HAVE_PDFLIB2
#else
-extern void php3_pdf_get_info(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pdf_get_info);
#endif
-extern void php3_pdf_set_info_creator(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_title(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_subject(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_author(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_info_keywords(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_open(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_close(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_begin_page(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_end_page(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_show(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_show_xy(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_leading(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_rendering(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_horiz_scaling(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_rise(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_matrix(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_text_pos(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_char_spacing(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_word_spacing(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_continue_text(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_stringwidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_save(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_restore(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_translate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_scale(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_rotate(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setflat(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinejoin(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinecap(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setmiterlimit(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setlinewidth(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setdash(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_moveto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_curveto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_lineto(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_circle(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_arc(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_rect(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_fill_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_closepath_fill_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_endpath(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_clip(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setgray(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor_fill(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor_stroke(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_setrgbcolor(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_add_outline(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_transition(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_duration(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_open_jpeg(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pdf_set_info_creator);
+PHP_FUNCTION(pdf_set_info_title);
+PHP_FUNCTION(pdf_set_info_subject);
+PHP_FUNCTION(pdf_set_info_author);
+PHP_FUNCTION(pdf_set_info_keywords);
+PHP_FUNCTION(pdf_open);
+PHP_FUNCTION(pdf_close);
+PHP_FUNCTION(pdf_begin_page);
+PHP_FUNCTION(pdf_end_page);
+PHP_FUNCTION(pdf_show);
+PHP_FUNCTION(pdf_show_xy);
+PHP_FUNCTION(pdf_set_font);
+PHP_FUNCTION(pdf_set_leading);
+PHP_FUNCTION(pdf_set_text_rendering);
+PHP_FUNCTION(pdf_set_horiz_scaling);
+PHP_FUNCTION(pdf_set_text_rise);
+PHP_FUNCTION(pdf_set_text_matrix);
+PHP_FUNCTION(pdf_set_text_pos);
+PHP_FUNCTION(pdf_set_char_spacing);
+PHP_FUNCTION(pdf_set_word_spacing);
+PHP_FUNCTION(pdf_continue_text);
+PHP_FUNCTION(pdf_stringwidth);
+PHP_FUNCTION(pdf_save);
+PHP_FUNCTION(pdf_restore);
+PHP_FUNCTION(pdf_translate);
+PHP_FUNCTION(pdf_scale);
+PHP_FUNCTION(pdf_rotate);
+PHP_FUNCTION(pdf_setflat);
+PHP_FUNCTION(pdf_setlinejoin);
+PHP_FUNCTION(pdf_setlinecap);
+PHP_FUNCTION(pdf_setmiterlimit);
+PHP_FUNCTION(pdf_setlinewidth);
+PHP_FUNCTION(pdf_setdash);
+PHP_FUNCTION(pdf_moveto);
+PHP_FUNCTION(pdf_curveto);
+PHP_FUNCTION(pdf_lineto);
+PHP_FUNCTION(pdf_circle);
+PHP_FUNCTION(pdf_arc);
+PHP_FUNCTION(pdf_rect);
+PHP_FUNCTION(pdf_closepath);
+PHP_FUNCTION(pdf_closepath_stroke);
+PHP_FUNCTION(pdf_stroke);
+PHP_FUNCTION(pdf_fill);
+PHP_FUNCTION(pdf_fill_stroke);
+PHP_FUNCTION(pdf_closepath_fill_stroke);
+PHP_FUNCTION(pdf_endpath);
+PHP_FUNCTION(pdf_clip);
+PHP_FUNCTION(pdf_setgray_fill);
+PHP_FUNCTION(pdf_setgray_stroke);
+PHP_FUNCTION(pdf_setgray);
+PHP_FUNCTION(pdf_setrgbcolor_fill);
+PHP_FUNCTION(pdf_setrgbcolor_stroke);
+PHP_FUNCTION(pdf_setrgbcolor);
+PHP_FUNCTION(pdf_add_outline);
+PHP_FUNCTION(pdf_set_transition);
+PHP_FUNCTION(pdf_set_duration);
+PHP_FUNCTION(pdf_open_jpeg);
#if HAVE_LIBGD13 && HAVE_PDFLIB2
-extern void php3_pdf_open_memory_image(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pdf_open_memory_image);
#endif
-extern void php3_pdf_open_gif(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_close_image(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_place_image(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_put_image(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_execute_image(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_add_weblink(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_add_annotation(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_border_style(INTERNAL_FUNCTION_PARAMETERS);
-extern void php3_pdf_set_border_color(INTERNAL_FUNCTION_PARAMETERS);
+PHP_FUNCTION(pdf_open_gif);
+PHP_FUNCTION(pdf_close_image);
+PHP_FUNCTION(pdf_place_image);
+PHP_FUNCTION(pdf_put_image);
+PHP_FUNCTION(pdf_execute_image);
+#if HAVE_PDFLIB2
+PHP_FUNCTION(pdf_add_weblink);
+PHP_FUNCTION(pdf_add_pdflink);
+PHP_FUNCTION(pdf_add_annotation);
+PHP_FUNCTION(pdf_set_border_style);
+PHP_FUNCTION(pdf_set_border_color);
+PHP_FUNCTION(pdf_get_image_width);
+PHP_FUNCTION(pdf_get_image_height);
+#endif
#else
#define pdf_module_ptr NULL
#endif