Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to position the text next to images properly in PDF?
    primarykey
    data
    text
    <p>I'm using PHP, Smarty and TCPDF library to generate the PDF copy of a document. The document contains images of mathematical expressions from WIRIS editor along with the text content.</p> <p>I'm having a problem positioning the text coming next to the expression image properly.</p> <p>I tried every thing in CSS <code>float</code> properties, but nothing happened. I'm attaching the screen shot of exactly what I want with this mail.</p> <p>This is the smarty template code to print the question and its options:</p> <pre><code>{foreach from=$question_data item=qstn_ans key=key} &lt;table border="0" width="100%" cellpadding="2" cellspacing="0"&gt; &lt;tr&gt; &lt;td valign="top" &gt;{if $qstn_ans.question_directions}{$qstn_ans.question_directions}&lt;br /&gt;&lt;b&gt;Question {$que_seq_no} : &lt;/b&gt;{/if}{$qstn_ans.question_text}&lt;/td&gt; &lt;/tr&gt; {if $qstn_ans.question_file} &lt;tr&gt; &lt;td&gt;&lt;img src="{$ques_thum_image_path}{$qstn_ans.question_id}_{$qstn_ans.question_file}" /&gt;&lt;/td&gt; &lt;/tr&gt; {/if} {if $qstn_ans.question_has_sub_ques==0} {if $qstn_ans.answer} {foreach from=$qstn_ans.answer item=ans key=ans_no} &lt;td valign="top" &gt; {if $ans.answer_is_right==1}{assign var='correct_ans' value=$ans_no+1}{/if} &lt;b&gt;{$ans_no+1}.&lt;/b&gt;&amp;nbsp;&amp;nbsp;{if $ans.answer_text!=''}{$ans.answer_text}{/if} {if $ans.answer_file!=''}&lt;img src="{$ans_thumb_img_path}{$ans.answer_id}_{$ans.answer_file}" /&gt;{/if} &lt;/td&gt; &lt;/tr&gt; {/foreach} &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; {/foreach} </code></pre> <p>This code snippet may contain some errors, as I pasted it randomly without checking the loop and brackets completion, but that's not the issue here. </p> <p>The only important part from this code are the lines to print the question text and question image if it is present.</p> <p>I researched for the right solution, but couldn't get the desired one. Can anyone help me out. </p> <p><a href="http://i.stack.imgur.com/nkSjB.png" rel="nofollow">Screenshot</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload