Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8268565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:56:03+00:00 2026-06-08T05:56:03+00:00

I have a table contains multiple rows and each row has an image. <table>

  • 0

I have a table contains multiple rows and each row has an image.

<table>
   <tr>
       <td style="">
          <img src="<?php echo $img_path; ?>" />
              <?php echo ucwords($name); ?>
       </td>
       <td style="">
          <span style="border-bottom: 1px solid;margin-left: 98px;">
              <?php echo $date; ?></span>
       </td>
   </tr>
   <tr>
       <td>
          <?php echo $role; ?> 
            Signature
       </td>
       <td style="">
          Date
       </td>
   </tr>
</table>

Is it possible in HTML2PDF to show images as shown in html rather than using his built in functions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T05:56:04+00:00Added an answer on June 8, 2026 at 5:56 am
    <?php
    require('html2fpdf.php');
    $pdf=new HTML2FPDF();
    $pdf->AddPage();
    $fp = fopen("sample.html","r");
    $strContent = fread($fp, filesize("sample.html"));
    fclose($fp);
    $pdf->WriteHTML($strContent);
    $pdf->Output("sample.pdf");
    echo "PDF file is generated successfully!";
    ?>
    

    Alternatively, you may use TCPDF and can try like this

    $content='<img src="sample.jpg">';
    $html = <<<EOD
    $content
    EOD;
    $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);
    $pdf->Output("sample.pdf", 'F');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok, I have a table which contains multiple rows. Each row contains some data
I have a table that contains multiple rows. Each row contains 5 columns (or
I have a generated table that contains multiple rows with each row containing a
I have a table with multiple rows, and each row contains three cells. Each
I have a table with multiple tbody's, each of which has a classed row,
My MysQL database contains multiple MyISAM tables, with each table containing millions of rows.
I have a table logging application activity. Each row contains a DateTime (Time) and
I have a table that contains multiple dropdown menus for a list of profile
I have a table that contains members names and a field with multiple ID
I have a table with a few thousand rows. The table contains two columns,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.