odoncaoa / html2pdf

Automatically exported from code.google.com/p/html2pdf
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Paragraphs contains some word in bold are rendered without spaces between the non bold and bold words #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a page containing e.g. "this is <strong>a test</strong>."
2. Run that page through html2pdf

What is the expected output? What do you see instead?
The output should display "this is a test." with "a test" being rendered 
as strong (font-weight bold).  Instead, the output is "this isa test." 
with "a test" rendered as strong.

What version of the product are you using? On what operating system?
Latest stable download on both Windows and Solaris.

Please provide any additional information below.

Line 38 of the file "inline.content.builder.normal.php" currently reads:
$last_whitespace = substr(strlen($content)-1, 1);

If this is changed to:
$last_whitespace = (substr($content, strlen($content)-1, 1) == " ");

then the code works as expected, and the spaces between the normal and 
strong text are rendered correctly in the pdf output.

Original issue reported on code.google.com by david.si...@tronsystems.co.uk on 1 Sep 2009 at 8:24