Summary | Different font styles in justified cells in PDF files |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Enhancement |
State | No Feedback |
Priority | 1. Low |
Owners | |
Requester | sebastian.radish (at) gmx (dot) de |
Created | 04/01/2010 (5576 days ago) |
Due | |
Updated | 01/22/2011 (5280 days ago) |
Assigned | |
Resolved | 01/22/2011 (5280 days ago) |
Milestone | |
Patch | No |
supports justified text, but it is impossible to change the font in
the text string.
Besides, the function sends the data directly to the output stream, so
you can't use 2 write calls.
I don't have a nice solution (yet). My hack solves the problem for me,
but probably not for many others.
State ⇒ Feedback
understand what you suggested.
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Different font styles in justified cells in PDF files
Type ⇒ Enhancement
State ⇒ New
with the multiCell function.
BUT if you want to mark a word bold/italic inside this text there is
no simple way to get the whole line justified.
I wrote a dirty hack. (It's very, very dirty, so I won't post a patch
(yet)) But the idea is the following:
1. Add some HTML/BBCode tags to the text.
2. While parsing the text char after char, use the tags to update the
font internally (Don't print the new font to the buffer.) but ignore
them in the string width.
3. When formating the text for output (done in cell()), replace the
HTML tags with something like this: ") Tj <NEW FONT INFORMATION> ("
The PDF viewer does the rest.
It took me some hours to figure this out. But with some help, maybe I
can write a nice patch.