Link to home
Start Free TrialLog in
Avatar of APD Toronto
APD TorontoFlag for Canada

asked on

TCPDF Bullet Image

Hi Experts,

How can I do a bullet image in TCPDF, for example like the finger bullet in MS Word?

I tried using the following code and extracted the followind bullets from Word, but it looks horrible. I added the border just to see how it aligns, but why does it not go all the way to the right?

Thank you,EE-PDF.zip

My code is

function create_bullet($bullet_name, $bullet_text){
    
    /*Acceptable Bullet Names:
     *              - finger
     *              - rainbow
     *              - square
     *              - square-whole
     *              - star
     */
    
    global $env;
    $img = $env['url'] . "images\bullet_$bullet_name.jpg";
    
    $bullet_html  = "<table style=\"width: 100%;\" border=\"1\"> <tr>";
    
    $bullet_html .= "<td style=\"width: 2cm;\"><img src=\"$img\" /></td>";
    $bullet_html .= "<td>$bullet_text</td>";
    
    $bullet_html .= "</tr></table>";
    
    return $bullet_html;
}

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Swatantra Bhargava
Swatantra Bhargava
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of APD Toronto

ASKER

Thank you!