dompdf and &nbsp and Styling

757 views
Skip to first unread message

Cielo Agnes Muyot

unread,
May 11, 2015, 10:34:48 AM5/11/15
to dom...@googlegroups.com
Hello Ma'ams/Sirs,

I've upgraded to the latest dompdf and used it on CI. It works great! However, I'm experiencing some problems. It gives me the correct output (except for the style) when the output's still on browser but it converts the   characters into question marks when downloaded. How to fix it? And one more thing, is there any way to make the bold calibri font a little thinner? Thanks in advance! :)

BrianS

unread,
May 11, 2015, 9:24:15 PM5/11/15
to dom...@googlegroups.com, cay....@gmail.com
I'm not sure what's going on with the nbsp. Are you using font subsetting? It could be that the particular glyph was removed for some reason during the subsetting process. I'd first try using the full font.

There is a reported issue with character spacing oddities. It's not directly related, but maybe the discussion will help you debug your problem.

I'm not sure what you mean by making the font a little thinner. Do you mean the actual width of the characters? The closest I can think of for that is to use a transform, though the text is rendered prior to applying the transform which means that line wrapping is not affected just the appearance of the characters. Here's an example:

You could also try styling the letter-spacing or word-spacing, but the results would probably be less than optimal.

Cielo Agnes Muyot

unread,
May 12, 2015, 12:31:56 AM5/12/15
to dom...@googlegroups.com, cay....@gmail.com
Hi sir, I just found out that the nbsp gets error on the Calibri font. So I just made a script that encloses the nbsp into a span that uses sans-serif. I'm also trying to transform the font now and I guess that should do the trick. Thank you very much for the help :)


On Tuesday, May 12, 2015 at 9:24:15 AM UTC+8, BrianS wrote:
I'm not sure what's going on with the nbsp. Are you using font subsetting? It could be that the particular glyph was removed for some reason during the subsetting process. I'd first try using the full font.

There is a reported issue with character spacing oddities. It's not directly related, but maybe the discussion will help you debug your problem.

I'm not sure what you mean by making the font a little thinner. Do you mean the actual width of the characters? The closest I can think of for that is letter spacing, though using a transform does not affect line wrapping just the appearance of the characters. Here's an example:

Riccardo Fraioli

unread,
May 12, 2015, 1:18:17 AM5/12/15
to dom...@googlegroups.com, cay....@gmail.com

Good morning .
Its possible to convert the string with utf_encode or similar method if using php?
By
R.f

--
You received this message because you are subscribed to the Google Groups "dompdf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dompdf+un...@googlegroups.com.
To post to this group, send email to dom...@googlegroups.com.
Visit this group at http://groups.google.com/group/dompdf.
For more options, visit https://groups.google.com/d/optout.

BrianS

unread,
May 12, 2015, 9:39:01 AM5/12/15
to dom...@googlegroups.com, cay....@gmail.com
That certainly works, though we're happy to try to help you figure out the source of the problem if you have the time and inclination.
Reply all
Reply to author
Forward
0 new messages