Bug #1033: Encoding in PDF is not used in any way
| From: | sami at iqs dot fi | Date: | Wed, 06 Jan 1999 11:40:23 +0000 |
| Subject: | Bug #1033: Encoding in PDF is not used in any way | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-3327@lists.php.net to get a copy of this message | ||
From: sami@iqs.fi
Operating system: Linux
PHP version: 3.0.6
PHP Bug Type: Feature/Change Request
Bug description: Encoding in PDF is not used in any way
The documentation states for the PDF_set_font()-function that the encoding-parameter should be given
as a string. The string however is not used in any way in PHP. That causes problems with
skandinavian alphabets. I have made a little change to PHP, which makes PHP expect an integer as the
encoding-parameter (like pdflib does) and uses it as the encoding method. This works well and now
I'm able to create PDF files that have skandinavian alphabets in them.
Here is a unified diff to do the thing I did:
--- functions/pdf.c Wed Jan 6 13:37:08 1999
+++ functions/pdf.c Wed Jan 6 13:37:54 1999
@@ -511,7 +511,7 @@
}
/* }}} */
-/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, string encoding)
+/* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, int encoding)
Select the current font face and size */
void php3_pdf_set_font(INTERNAL_FUNCTION_PARAMETERS) {
pval *arg1, *arg2, *arg3, *arg4;
@@ -526,7 +526,7 @@
convert_to_long(arg1);
convert_to_string(arg2);
convert_to_double(arg3);
- convert_to_string(arg4);
+ convert_to_long(arg4);
id=arg1->value.lval;
pdf = php3_list_find(id,&type);
if(!pdf || type!=PDF_GLOBAL(le_pdf)) {
@@ -534,7 +534,7 @@
RETURN_FALSE;
}
- PDF_set_font(pdf, arg2->value.str.val, (float) arg3->value.dval, builtin);
+ PDF_set_font(pdf, arg2->value.str.val, (float) arg3->value.dval, arg4->value.lval);
RETURN_TRUE;
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net