<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Different font styles in justified cells in PDF files</title> 
  <pubDate>Sun, 05 Apr 2026 08:28:47 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8945</link> 
  <atom:link rel="self" type="application/rss+xml" title="Different font styles in justified cells in PDF files" href="https://bugs.horde.org/ticket/8945/rss" /> 
  <description>Different font styles in justified cells in PDF files</description> 
 
   
   
  <item> 
   <title>Justified text looks really nice and the File_PDF class can </title> 
   <description>Justified text looks really nice and the File_PDF class can do this 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&#039;s very, very dirty, so I won&#039;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&#039;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: &quot;) Tj &lt;NEW FONT INFORMATION&gt; (&quot;
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.</description> 
   <pubDate>Thu, 01 Apr 2010 00:15:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8945#t58362</link> 
  </item> 
   
  <item> 
   <title>This sounds really hackish. But without a patch, I&#039;m not eve</title> 
   <description>This sounds really hackish. But without a patch, I&#039;m not even sure I understand what you suggested.</description> 
   <pubDate>Thu, 21 Oct 2010 17:04:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8945#t60568</link> 
  </item> 
   
  <item> 
   <title>I think the problem is in the write function of the PDF clas</title> 
   <description>I think the problem is in the write function of the PDF class. It 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&#039;t use 2 write calls.

I don&#039;t have a nice solution (yet). My hack solves the problem for me, but probably not for many others.</description> 
   <pubDate>Fri, 22 Oct 2010 12:39:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8945#t60600</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
