Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.4
-
Fix Version/s: None
-
Component/s: Zend_Pdf
-
Labels:None
Description
When saving a PDF with improperly encoded data, mb_detect_encoding() can return boolean false, which Zend_PDF::render() does not expect. This causes mb_convert_encoding to fail with Warning:
Warning at /www/ZendFramework/library/Zend/Pdf.php:737: mb_convert_encoding() [function.mb-convert-encoding]: Illegal character encoding specified
In my experience improperly encoded PDFs are ubiquitous, so Zend_PDF should be able to handle them instead of expecting the input data to be perfect.
Attached is a patch for how I believe a failed mb_detect_encoding() should be handled, and files to reproduce the problem.
Zend Issue #ZF-7177 also applies here
Attachments
Issue Links
| This issue is related to: | ||||
| ZF-7177 | When ZendPDF::save() exits due to fatal error/exception, PDF file is erased |
|
|
|
PDF File with which to reproduce the bug.