#endif
#endif
+#define CPDF_FETCH_CPDFDOC(pdf_zval) \
+ convert_to_long(pdf_zval); \
+ id = Z_LVAL_P(pdf_zval); \
+ pdf = zend_list_find(id, &type); \
+ if(!pdf || type != CPDF_GLOBAL(le_cpdf)) { \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find identifier %d", id); \
+ RETURN_FALSE; \
+ } \
+
function_entry cpdf_functions[] = {
PHP_FE(cpdf_global_set_document_limits, NULL)
PHP_FE(cpdf_set_creator, NULL)
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
- RETURN_FALSE;
- }
cpdf_setCreator(pdf, Z_STRVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
- RETURN_FALSE;
- }
cpdf_setTitle(pdf, Z_STRVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
- RETURN_FALSE;
- }
cpdf_setSubject(pdf, Z_STRVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if (!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d (type=%d)", get_active_function_name(TSRMLS_C), id, type);
- RETURN_FALSE;
- }
cpdf_setKeywords(pdf, Z_STRVAL_P(arg2));
if (getParameters(ht, 2, &arg1, &arg2) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_array(arg2);
- id = Z_LVAL_P (arg1);
-
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
-
if (zend_hash_find (Z_ARRVAL_P(arg2), "pagemode", sizeof ("pagemode"), (void **) &zvalue) == SUCCESS)
{
convert_to_long_ex (zvalue);
convert_to_string(arg2);
#if APACHE
if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
- php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Write to a memory stream and use cpdf_output_buffer() instead.");
#endif
cpdf_setOutputFilename(cpdf, Z_STRVAL_P(arg2));
}
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
+
zend_list_delete(id);
RETURN_TRUE;
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_long(argv[1]);
convert_to_long(argv[2]);
convert_to_long(argv[3]);
convert_to_long(argv[4]);
- id=Z_LVAL_P(argv[0]);
pagenr=Z_LVAL_P(argv[1]);
orientation=Z_LVAL_P(argv[2]);
height = Z_LVAL_P(argv[3]);
width = Z_LVAL_P(argv[4]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 5) {
convert_to_double(argv[5]);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
- id=Z_LVAL_P(arg1);
pagenr=Z_LVAL_P(arg2);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
-
+
cpdf_finalizePage(pdf, pagenr);
RETURN_TRUE;
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
- id=Z_LVAL_P(arg1);
pagenr=Z_LVAL_P(arg2);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setCurrentPage(pdf, pagenr);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_beginText(pdf, 0);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_endText(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_textShow(pdf, Z_STRVAL_P(arg2));
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_string(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc == 5) {
convert_to_long(argv[4]);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_textCRLFshow(pdf, Z_STRVAL_P(arg2));
if((argc < 2) || (argc == 3) || (argc > 7) || getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_string(argv[1]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 4) {
convert_to_long(argv[4]);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
convert_to_double(arg3);
convert_to_string(arg4);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
/* if(Z_LVAL_P(arg4) > 6) {
- php_error(E_WARNING, "%s(): Font encoding set to 5", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Font encoding set to 5");
Z_LVAL_P(arg4) = 5;
}
*/
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
convert_to_string(arg3);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setFontDirectories(pdf, Z_STRVAL_P(arg2), Z_STRVAL_P(arg3));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setFontMapFile(pdf, Z_STRVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setTextLeading(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setTextRenderingMode(pdf, Z_LVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setHorizontalScaling(pdf, (float) Z_DVAL_P(arg2) * 100.0);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setTextRise(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_array(arg2);
- id=Z_LVAL_P(arg1);
- matrix=Z_ARRVAL_P(arg2);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(zend_hash_num_elements(matrix) != 6) {
- php_error(E_WARNING, "%s(): Text matrix must have 6 elements", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Text matrix must have 6 elements");
RETURN_FALSE;
}
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 3) {
convert_to_long(argv[3]);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_rotateText(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setCharacterSpacing(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setWordSpacing(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
width = (double) cpdf_stringWidth(pdf, Z_STRVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_gsave(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_grestore(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
convert_to_double(arg3);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_rawTranslate(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
convert_to_double(arg3);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_scale(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_rotate(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if((Z_LVAL_P(arg2) > 100) && (Z_LVAL_P(arg2) < 0)) {
- php_error(E_WARNING, "%s(): Parameter has to between 0 and 100", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter has to between 0 and 100");
RETURN_FALSE;
}
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
- php_error(E_WARNING, "%s(): Parameter has to between 0 and 2", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter has to between 0 and 2");
RETURN_FALSE;
}
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if((Z_LVAL_P(arg2) > 2) && (Z_LVAL_P(arg2) < 0)) {
- php_error(E_WARNING, "%s(): Parameter has to be > 0 and =< 2", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter has to be > 0 and =< 2");
RETURN_FALSE;
}
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(Z_DVAL_P(arg2) < 1) {
- php_error(E_WARNING, "%s(): Parameter has to be >= 1", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Parameter has to be >= 1");
RETURN_FALSE;
}
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setlinewidth(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
convert_to_long(arg3);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
snprintf(buffer, BUFFERLEN, "[%d %d] 0", (int) Z_LVAL_P(arg2), (int) Z_LVAL_P(arg3));
cpdf_setdash(pdf, buffer);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 3) {
convert_to_long(argv[3]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 3) {
convert_to_long(argv[3]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[4]);
convert_to_double(argv[5]);
convert_to_double(argv[6]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 7) {
convert_to_long(argv[7]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 3) {
convert_to_long(argv[3]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 3) {
convert_to_long(argv[3]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 4) {
convert_to_long(argv[4]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[4]);
convert_to_double(argv[5]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 6) {
convert_to_long(argv[6]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[4]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 5) {
convert_to_long(argv[5]);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_newpath(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_closepath(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_closepath(pdf);
cpdf_stroke(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_stroke(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_fill(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_fill(pdf);
cpdf_stroke(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_closepath(pdf);
cpdf_fill(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_clip(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setgrayFill(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setgrayStroke(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setgray(pdf, (float) Z_DVAL_P(arg2));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
convert_to_double(arg3);
convert_to_double(arg4);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setrgbcolorFill(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
convert_to_double(arg3);
convert_to_double(arg4);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setrgbcolorStroke(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_double(arg2);
convert_to_double(arg3);
convert_to_double(arg4);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setrgbcolor(pdf, (float) Z_DVAL_P(arg2), (float) Z_DVAL_P(arg3), (float) Z_DVAL_P(arg4));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_long(arg2);
convert_to_double(arg3);
convert_to_double(arg4);
convert_to_long(arg5);
convert_to_long(arg6);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
cpdf_setPageTransition(pdf, Z_LVAL_P(arg2), Z_DVAL_P(arg3), Z_DVAL_P(arg4),
Z_LVAL_P(arg5), Z_LVAL_P(arg6));
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
cpdf_finalizeAll(pdf);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
+ CPDF_FETCH_CPDFDOC(arg1);
buffer = cpdf_getBufferForPDF(pdf, &lenght);
WRONG_PARAM_COUNT;
}
- convert_to_long(arg1);
+ CPDF_FETCH_CPDFDOC(arg1);
convert_to_string(arg2);
- id=Z_LVAL_P(arg1);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
#if APACHE
if(strcmp(Z_STRVAL_P(arg2), "-") == 0)
- php_error(E_WARNING, "%s(): Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Use cpdf_output_buffer() instead.", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Writing to stdout as described in the ClibPDF manual is not possible if php is used as an Apache module. Use cpdf_output_buffer() instead.");
#endif
cpdf_savePDFmemoryStreamToFile(pdf, Z_STRVAL_P(arg2));
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_string(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[8]);
yscale = (float) Z_DVAL_P(argv[8]);
convert_to_long(argv[9]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
if(argc > 10) {
convert_to_long(argv[10]);
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_long(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[5]);
convert_to_double(argv[6]);
convert_to_long(argv[7]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
gid=Z_LVAL_P(argv[1]);
im = zend_list_find(gid, &type);
ZEND_GET_RESOURCE_TYPE_ID(CPDF_GLOBAL(le_gd), "gd");
if(!CPDF_GLOBAL(le_gd))
{
- php_error(E_ERROR, "%s(): Unable to find handle for GD image stream. Please check the GD extension is loaded.", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to find handle for GD image stream. Please check the GD extension is loaded.");
}
if (!im || type != CPDF_GLOBAL(le_gd)) {
- php_error(E_WARNING, "%s(): Unable to find image pointer", get_active_function_name(TSRMLS_C));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find image pointer");
RETURN_FALSE;
}
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[4]);
convert_to_string(argv[5]);
convert_to_string(argv[6]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
attrib.flags = AF_NOZOOM | AF_NOROTATE | AF_READONLY;
attrib.border_array = "[0 0 1 [4 2]]";
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_double(argv[1]);
convert_to_double(argv[2]);
convert_to_double(argv[3]);
convert_to_double(argv[4]);
convert_to_string(argv[5]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
attrib.flags = AF_NOZOOM | AF_NOROTATE | AF_READONLY;
attrib.border_array = "[0 0 1 [4 0]]";
if (getParametersArray(ht, argc, argv) == FAILURE)
WRONG_PARAM_COUNT;
- convert_to_long(argv[0]);
+ CPDF_FETCH_CPDFDOC(argv[0]);
convert_to_long(argv[1]);
convert_to_long(argv[2]);
convert_to_long(argv[3]);
convert_to_long(argv[4]);
convert_to_string(argv[5]);
- id=Z_LVAL_P(argv[0]);
- pdf = zend_list_find(id, &type);
- if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
- php_error(E_WARNING, "%s(): Unable to find identifier %d", get_active_function_name(TSRMLS_C), id);
- RETURN_FALSE;
- }
oid=Z_LVAL_P(argv[1]);
lastoutline = zend_list_find(oid, &type);
if(!lastoutline || type!=CPDF_GLOBAL(le_outline)) {
lastoutline = NULL;
-/* php_error(E_WARNING, "%s(): Unable to find last outline entry %d", get_active_function_name(TSRMLS_C), id);
+/* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find last outline entry %d", id);
RETURN_FALSE; */
}