vikrambalye / dompdf

Automatically exported from code.google.com/p/dompdf
0 stars 0 forks source link

Multibyte char at line end will strip the rest of the line #414

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When a multibyte char is located at the end of a line, than this character and 
the rest of the line is removed (not rendered in the pdf)

What version of dompdf are you using? What version of PHP? On what
operating system?
0.5 und 0.6, linux, php 5.2.6

I included a working example. I tried it with "ß" and "ä". If one of both is 
at the end of a line, then the line is stripped.
e.g. related to my attached file, the document renders the line only to the 
"ß":

aaaaaaaaaaaaaaaaaaaaaaaaa Nicht-eingeladene Bewerber, die interessante 
Bewerbungsunterlagen gemä

instead of:

aaaaaaaaaaaaaaaaaaaaaaaa Nicht-eingeladene Bewerber, die interessante 
Bewerbungsunterlagen gemäß "Anlage Checkliste für Kriterien(...)

I also tried using HTML-Entities (ß and ä), but without success, the 
problem stays. Multibyte Chars everywhere render fine.

Original issue reported on code.google.com by stwien...@gmail.com on 1 Feb 2012 at 2:19

Attachments:

GoogleCodeExporter commented 9 years ago
I wasn't able to reproduce it with the trunk, could you try it to see if it 
solves the problem?

Original comment by fabien.menager on 3 Feb 2012 at 9:30

Attachments:

GoogleCodeExporter commented 9 years ago
I was also unable to reproduce the problem. It may be an issue related to your 
version of PHP (5.2.6). If I have the opportunity I'll compile a copy and check 
for the issue.

Original comment by eclecticgeek on 5 Feb 2012 at 1:55

GoogleCodeExporter commented 9 years ago
Thank you for your time.

I tried it with svn-trunk, with no difference.
The problem seems to be related with the PHP version. I tried 5.3.6 and the 
rendering was succesful. Unfortunatly, I can't upgrade the server's PHP to 
5.3.x, due to legacy PHP Apps. Do you have any idea for a workaround or 
starting point?

Original comment by stwien...@gmail.com on 10 Feb 2012 at 3:24

GoogleCodeExporter commented 9 years ago
With the latest release can you check www/setup.php page for any red flags?

It almost sounds like a problem similar to the multi-byte text splitting bug in 
PHP prior to 5.2.7 (already addressed). Only here you're having the line 
truncated instead of split in the middle of a character.

Can you post the resulting PDF so we look for any oddities in that?

Original comment by eclecticgeek on 10 Feb 2012 at 4:18

GoogleCodeExporter commented 9 years ago
OK, I used the latest SVN-Trunk and removed all warnings/red flags from 
setup.php.
(There been only some warnings about not being able to write to the log). The 
bug is still there.

I attached the resulting pdf with the missing rest of the line. If there is no 
solution, I will try to upgrade PHP to 5.2.17. for our servers. Meanwhile, 
putting a <br> in front of the broken word, will trigger the manual line-break.

Thank you for your time! 

Original comment by stwien...@gmail.com on 13 Feb 2012 at 2:35

Attachments:

GoogleCodeExporter commented 9 years ago
I just upgraded the PHP to the latest patch-version offered by Debian

PHP 5.2.6-1+lenny16 with Suhosin-Patch 0.9.6.2 (cli) (built: Feb  3 2012 
13:17:21) 

The pdf now renders find with the whole line :) Seems, the debian guyes 
backportet the PHP issues with the 5.2 version (there is no offical version 
higher than 5.2.6 in the debian lenny repositories).
Thanks for pointing me in the right direction, this fixed it for me!

Original comment by stwien...@gmail.com on 14 Feb 2012 at 7:19

GoogleCodeExporter commented 9 years ago
Thanks for the update. We'll keep the issue open for now in hopes that we will 
have a chance to look into the cause of the bug.

Original comment by eclecticgeek on 14 Feb 2012 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by eclecticgeek on 24 May 2013 at 3:00