From: Joey Smith Date: Sun, 23 Jul 2000 08:31:13 +0000 (+0000) Subject: Setting "compatibility" parameter requires having a PDF structure that X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a44137974ba000a7fb8f1079184880e5abc9aa34;p=php Setting "compatibility" parameter requires having a PDF structure that has NOT had PDF_open_*() called on it, according to the documentation. There is not currently any way to obtain such from user-land in PHP. @ Catch users trying to set "compatibility" parameter, which is not @ supported from user-land. # # Not sure this is the best way to do this... # Uwe, could you please double check this? --- diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c index cab3158d56..15fc38ed12 100644 --- a/ext/pdf/pdf.c +++ b/ext/pdf/pdf.c @@ -1844,6 +1844,11 @@ PHP_FUNCTION(pdf_set_parameter) { RETURN_FALSE; } + if (arg2->value.str.val == "compatibility") { + php_error(E_ERROR,"Compatibility modes not supported at this time"); + RETURN_FALSE; + } + PDF_set_parameter(pdf, arg2->value.str.val, arg3->value.str.val); RETURN_TRUE;