Save PDF by name from Database - php

I am saving my records as PDF but I want them saved by using name_empnumber like abc_123
I am using the code below and library TCFPDF
if (isset($_POST['submit'])){
require_once 'includes/practice.php';
//practice.php is using library tcfpdf
$pdf->SetFont('times', '', 15);
$tb1 = '</br></br>
<b>2- Printer:</b><br /><br />
<table cellspacing="0" cellpadding="0" border="1">
<tr style="background-color:#f7f7f7;color:#333; ">
<td width="300">SN</td>
<td width="300">TYPE</td>
</tr>
</table>';
$result= mysql_query("SELECT * FROM accessories where emp_number='".$emp_number."' && is_accessory='Printer'");
while($row = mysql_fetch_assoc($result)){
$tb2 = '<table cellspacing="0" cellpadding="2" border="1">
<tr>
<td width="300">'.$row['serial'].'</td>
<td width="300">'.$row['model'].'</td>
</tr>
</table>';
$tb1 = $tb1.$tb2;
}
$pdf->writeHTML($tb1, true, false, false, false, '');
ob_end_clean();
$pdf->Output('Report.pdf', 'D');
}
See this is saving as Report.PDF.
I want to save as name_empnumber.pdf like abc-123.pdf

Related

How to pass data from database to multiples tables on one file with TCPDF?

I am trying to create a PDF with the data from my database. I divide my data to be displayed with many tables like shown below. I tried to fetch the data from my database with the $output and fetch data.
How can I do for each data to display below the corresponding that are in my tables with the same name?
Because i have different tables, should I do multiple function to fetch my data from database with each function for each table?
$session_id ="0";
function fetch_data()
{
$output = '';
$conn = mysqli_connect("localhost", "root", "", "thermoform_data");
$sql = "SELECT * FROM form_data WHERE id = '1' ORDER BY id ASC";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_array($result))
{
$output .= '<tr>
<td>'.$row["id"].'</td>
<td>'.$row["session_id"].'</td>
<td>'.$row["manufacturing_name"].'</td>
<td>'.$row["head_office"].'</td>
<td>'.$row["legal_form"].'</td>
<td>'.$row["activity"].'</td>
<td>'.$row["filiales"].'</td>
<td>'.$row["products"].'</td>
<td>'.$row["website"].'</td>
<td>'.$row["telephone"].'</td>
<td>'.$row["fax"].'</td>
<td>'.$row["email"].'</td>
<td>'.$row["project_name"].'</td>
<td>'.$row["first_last_name_manager"].'</td>
<td>'.$row["title_manager"].'</td>
<td>'.$row["tel_manager"].'</td>
<td>'.$row["email_manager"].'</td>
<td>'.$row["country_manager"].'</td>
<td>'.$row["zip_code_manager"].'</td>
<td>'.$row["first_last_name_collaborator1"].'</td>
<td>'.$row["title_collaborator1"].'</td>
<td>'.$row["tel_collaborator1"].'</td>
<td>'.$row["email_collaborator1"].'</td>
<td>'.$row["country_collaborator1"].'</td>
<td>'.$row["zip_code_collaborator1"].'</td>
<td>'.$row["first_last_name_collaborator2"].'</td>
<td>'.$row["title_collaborator2"].'</td>
<td>'.$row["tel_collaborator2"].'</td>
<td>'.$row["email_collaborator2"].'</td>
<td>'.$row["country_collaborator2"].'</td>
<td>'.$row["zip_code_collaborator2"].'</td>
<td>'.$row["project_charter"].'</td>
<td>'.$row["project_management_plan"].'</td>
<td>'.$row["project_scope_plan"].'</td>
<td>'.$row["project_schedule_plan"].'</td>
<td>'.$row["project_risk_plan"].'</td>
<td>'.$row["project_work_plan"].'</td>
<td>'.$row["project_team_plan"].'</td>
<td>'.$row["material_type"].'</td>
<td>'.$row["manufacturer"].'</td>
<td>'.$row["trade_name"].'</td>
<td>'.$row["physical_properties"].'</td>
<td>'.$row["chemical_properties"].'</td>
<td>'.$row["alloy_composition"].'</td>
<td>'.$row["technology_solutions"].'</td>
<td>'.$row["reporting_and_dashboards"].'</td>
<td>'.$row["data_analysis"].'</td>
<td>'.$row["software_consulting"].'</td>
<td>'.$row["system_analysis"].'</td>
<td>'.$row["training"].'</td>
<td>'.$row["accounting_services"].'</td>
</tr>
';
}
return $output;
}
if(isset($_POST["generate_pdf"]))
{
require_once('TCPDF-master/tcpdf.php');
$obj_pdf = new TCPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$obj_pdf->SetCreator(PDF_CREATOR);
$obj_pdf->SetTitle("Form data");
$obj_pdf->SetHeaderData('', '', PDF_HEADER_TITLE, PDF_HEADER_STRING);
$obj_pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$obj_pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$obj_pdf->SetDefaultMonospacedFont('helvetica');
$obj_pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
/*$obj_pdf->SetMargins(PDF_MARGIN_LEFT, '0', PDF_MARGIN_RIGHT); */
$obj_pdf->setPrintHeader(false);
$obj_pdf->setPrintFooter(false);
$obj_pdf->SetAutoPageBreak(TRUE, 10);
$obj_pdf->SetFont('helvetica', '', 9);
$obj_pdf->AddPage('L');
$content = '';
$content .= '
<h4 align="center">Form data</h4><br />
<table border="1" cellspacing="0" cellpadding="2">
<tr>
<th>Id</th>
<th>session_id</th>
<th>manufacturing_name</th>
<th>head_office</th>
<th>legal_form</th>
<th>activity</th>
<th>filiales</th>
<th>products</th>
<th>website</th>
<th>telephone</th>
<th>fax</th>
<th>email</th>
<th>project_name</th>
<th>first_last_name_manager</th>
<th>title_manager</th>
<th>tel_manager</th>
<th>email_manager</th>
<th>country_manager</th>
<th>zip_code_manager</th>
<th>first_last_name_collaborator1</th>
<th>title_collaborator1</th>
<th>tel_collaborator1</th>
<th>email_collaborator1</th>
<th>country_collaborator1</th>
<th>zip_code_collaborator1</th>
<th>first_last_name_collaborator2</th>
<th>title_collaborator2</th>
<th>tel_collaborator2</th>
<th>email_collaborator2</th>
<th>country_collaborator2</th>
<th>zip_code_collaborator2</th>
<th>project_charter</th>
<th>project_management_plan</th>
<th>project_scope_plan</th>
<th>project_schedule_plan</th>
<th>project_risk_plan</th>
<th>project_work_plan</th>
<th>project_team_plan</th>
<th>material_type</th>
<th>manufacturer</th>
<th>trade_name</th>
<th>physical_properties</th>
<th>chemical_properties</th>
<th>alloy_composition</th>
<th>technology_solutions</th>
<th>reporting_and_dashboards</th>
<th>data_analysis</th>
<th>software_consulting</th>
<th>system_analysis</th>
<th>training</th>
<th>accounting_services</th>
</tr>
';
$tbl1 = '';
$tbl1 .= '
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
<tr>
<th colspan="11" align="center">NON-BREAKING TABLE</th>
</tr>
<tr>
<td>Id</td>
<td>session_id</td>
<td>manufacturing_name</td>
<td>head_office</td>
<td>legal_form</td>
<td>activity</td>
<td>filiales</td>
<td>products</td>
<td>websites</td>
<td>fax</td>
<td>email</td>
</tr>
</table>
';
$obj_pdf->writeHTML($tbl1, true, false, false, false, '');
$tbl2="";
$tbl2 .= '
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
<tr>
<th colspan="7" align="center">NON-BREAKING TABLE</th>
</tr>
<tr>
<td>project_name</td>
<td>first_last_name_manager</td>
<td>title_manager</td>
<td>tel_manager</td>
<td>email_manager</td>
<td>country_manager</td>
<td>zip_code_manager</td>
</tr>
<tr>
<td>first_last_name_collaborator1</td>
<td>title_collaborator1</td>
<td>tel_collaborator1</td>
<td>email_collaborator1</td>
<td>country_collaborator1</td>
<td>zip_code_collaborator1</td>
</tr>
<tr>
<td>first_last_name_collaborator2</td>
<td>title_collaborator2</td>
<td>tel_collaborator2</td>
<td>email_collaborator2</td>
<td>country_collaborator2</td>
<td>zip_code_collaborator2</td>
</tr>
</table>
';
$obj_pdf->writeHTML($tbl2, true, false, false, false, '');
$tbl3="";
$tbl3 .='
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
<tr>
<th colspan="7" align="center">NON-BREAKING TABLE</th>
</tr>
<tr>
<td>project_charter</td>
<td>project_management_plan</td>
<td>project_scope_plan</td>
<td>pproject_schedule_plan</td>
<td>project_risk_plan</td>
<td>project_work_plan</td>
<td>project_team_plan</td>
</tr>
</table>
';
$obj_pdf->writeHTML($tbl3, true, false, false, false, '');
$tbl4="";
$tbl4 .='
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
<tr>
<th colspan="6" align="center">NON-BREAKING TABLE</th>
</tr>
<tr>
<td>material_type</td>
<td>manufacturer</td>
<td>trade_name</td>
<td>physical_properties</td>
<td>chemical_properties</td>
<td>alloy_composition</td>
</tr>
</table>
';
$obj_pdf->writeHTML($tbl4);
$tbl5="";
$tbl5 ='
<table border="1" cellpadding="2" cellspacing="2" nobr="true">
<tr>
<th colspan="6" align="center">NON-BREAKING TABLE</th>
</tr>
<tr>
<td>technology_solutions</td>
<td>reporting_and_dashboards</td>
<td>data_analysis</td>
<td>software_consulting</td>
<td>system_analysis</td>
<td>training</td>
<td>accounting_services</td>
</tr>
</table>
';
$obj_pdf->writeHTML($tbl5, true, false, false, false, '');
// -----------------------------------------------------------------------------
/* header('Content-type: application/pdf');*/
ob_get_clean();
$obj_pdf->setAutoPageBreak(true, 0);
$content .= fetch_data();
$content .= '</table>';
$obj_pdf->writeHTML($content);
$obj_pdf->Output('file.pdf', 'I');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>SoftAOX | Generate HTML Table Data To PDF From MySQL Database Using TCPDF In PHP</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />
</head>
<body>
<br />
<div class="container">
<h4 align="center"> Generate HTML Table Data To PDF From MySQL Database Using TCPDF In PHP</h4><br />
<div class="table-responsive">
<div class="col-md-12" align="right">
<form method="post" action="{{URL('index3')}}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<!-- <input type="number" name="session_id">-->
<input type="submit" name="generate_pdf" class="btn btn-success" value="Generate PDF" />
</form>
</div>
<br />
<br />
<table class="table table-bordered">
<tr>
<th width="5%">Id</th>
<th width="30%">Name</th>
<th width="15%">Age</th>
<th width="50%">Email</th>
</tr>
<?php
echo fetch_data();
?>
</table>
</div>
</div>
</body>
</html>
Right now, none of my data are showing, I only have the row and my table but no data from database inside. I expected to see the data below each rows of my table with the corresponding names.

Unable to get the size of the image ( codeigniter , tcpdf , php )

I have a problem when trying to show picture in tcpdf using codeigniter,
This is my pdf view:
$base_url=base_url();
// NON-BREAKING ROWS (nobr="true")
$tbleauproduct = <<<EOD
<br /><br /><br />
<table border="1" align="center">
<tr>
<th>picture</th>
<th>Product name</th>
<th>Price</th>
<th>Quantity</th>
</tr>
<tr>
<td><img src="$base_url/assets/$picture" /></td>
<td>$name</td>
<td>$price</td>
<td>$qty</td>
</tr>
</table>
EOD;
$pdf->writeHTML($tbleauproduct, true, false, true, false, '');
and this is the result:
TCPDF ERROR: [Image] Unable to get the size of the image: http://localhost:8888/open_bay//assets/130501153059-htc-one-1024x576.jpeg
$file_path = base_url().'assets/130501153059-htc-one-1024x576.jpeg';
$size = filesize($file_path);

Goutte - Get table column

how can I get just one column not whole table?
<table cellspacing="0" cellpadding="0" align="Center" rules="all" border="1">
<tbody>
<tr>
<td>Entity Name</td>
<td>NV Business ID</td>
<td>Status</td>
<td>Type</td>
</tr>
<tr>
<td>GOOGLE</td>
<td></td>
<td>Expired</td>
<td>Reserved Name</td>
</tr>
<tr>
<td>GOOGLE INC.</td>
<td>NV20161275322</td>
<td>Active</td>
<td>Foreign Corporation
</td>
</tr>
</tbody>
</table>
Here is my try:
$client = new Client();
$crawler = $client->request('GET', 'url');
$form = $crawler->selectButton('Search')->form();
$crawler = $client->submit($form, array(
...
));
$crawler->filter('table tr')->each(function ($node) {
print $node->text()."\n \n";
// print $node->filter('td')->text() . '<br />';
});
It's always returning whole table.
Also tried stn like tr[1], etc..
Can someone help please?
Thanks
I found a solution:
$node->filter('td')->eq(2)->text();
2 means third column, because it's [0,1,2,...]
You can use DOMDocument for getting data from HTML.
PHP code demo
<?php
ini_set("display_errors", 1);
$html = '<table cellspacing="0" cellpadding="0" align="Center" rules="all" border="1">
<tbody>
<tr>
<td>Entity Name</td>
<td>NV Business ID</td>
<td>Status</td>
<td>Type</td>
</tr>
<tr>
<td>GOOGLE</td>
<td></td>
<td>Expired</td>
<td>Reserved Name</td>
</tr>
<tr>
<td>GOOGLE INC.</td>
<td>NV20161275322</td>
<td>Active</td>
<td>Foreign Corporation
</td>
</tr>
</tbody>
</table>';
$result=array();
$object= new DOMDocument();
$object->loadHTML($html);
$requiredColumn=3;
$requiredColumn--;
foreach($object->getElementsByTagName("tr") as $value)
{
$nodelistObject=$value->getElementsByTagName("td");
$columnCounter=0;
foreach($nodelistObject as $tdNode)
{
if($columnCounter==$requiredColumn)
{
if($tdNode->getElementsByTagName("a")->length==0)
{
$result[]=$tdNode->textContent;
}
foreach($tdNode->getElementsByTagName("a") as $aElement)
{
$result[]=$aElement->textContent;
}
}
$columnCounter++;
}
}
print_r($result);
Try the below code:
$content = $crawler->filter( 'table' )->extract( array( '_text' ) );

Display non-english characters with TCPDF

I am using the TCPDF library to export Album / Catalog Release information for a music site, the Album consists of songs labels that could be in English, chinese or any other language, I am having a problem to print the non-English character correctly inside the tcpdf. Some points I would like to tell.
I am using Zend framework 1.12.
Database Connection collation utf8 .
Table field collation utf8_unicode_ci .
My scenario is that the information is coming from the database and I use a view to display information related to the album in a specific format along with the HTML. The release name is in Chinese 奥马尔阿斯拉姆, I tried all the options by searching on stackoverflow which were related to setting the font and changing character collation while initializing the TCPDF object, but whenever I print it displays the name like this 奥马尔阿斯拠i tried to utf8_encode() and utf8_decode() around the Release Name inside the HTML but nothing helps.
Another is an example is with the Latin characters where the name of the album is Extraña EP and when printed inside the pdf it displays it like Extraña EP.
Here is the HTML I use inside my view.
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">
<img src="/images/release_details.png">
</td>
</tr>
<tr>
<td align="left" valign="top">
<table width="100%" cellpadding="0" cellspacing="0" class="release_table">
<tr>
<td align="left" valign="top" class="label">CATALOG #:</td>
<td align="right" valign="top" class="data"><?=$this->release->Catalog?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">RELEASE NAME:</td>
<td align="right" valign="top" class="data"><?=$this->release->Name?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">RELEASE TYPE:</td>
<td align="right" valign="top" class="data"><?=$releaseType?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">UPC CODE:</td>
<td align="right" valign="top" class="data"><?=$this->release->UPCCode?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">NUMBER OF SONGS:</td>
<td align="right" valign="top" class="data"><?=$this->release->TracksQty?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">PRIMARY ARTIST:</td>
<td align="right" valign="top"
class="data"><?=$this->release->PrimaryArtist?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">LABEL:</td>
<td align="right" valign="top" class="data"><?=$this->release->LabelName?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">MAIN GENRE:</td>
<td align="right" valign="top" class="data"><?=$this->release->MainGenre?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">GENRE:</td>
<td align="right" valign="top" class="data"><?=$this->release->Genre?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">(C):</td>
<td align="right" valign="top"
class="data"><?=$this->release->CLine . " " . $this->release->CYear?></td>
</tr>
<tr>
<td align="left" valign="top" class="label">(P):</td>
<td align="right" valign="top"
class="data"><?=$this->release->PLine . " " . $this->release->PYear?></td>
</tr>
<?php if ($this->release->Howlong > 0 && $this->release->EffectiveDate > 0) {?>
<tr>
<td align="left" valign="top" class="label">EXCLUSIVE DATE:</td>
<td align="right" valign="top"
class="data"><?=$this->release->EffectiveDate?></td>
</tr>
<?php }?>
<tr>
<td align="left" valign="top" class="label">RELEASE DATE:</td>
<td align="right" valign="top" class="data"><?=$this->release->ReleaseDate?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="middle"> </td>
</tr>
<tr>
<td align="center" valign="middle">
<img src="/images/symphonic_logo.png"/>
</td>
</tr>
</table>
And here is the code where i call this view before i send the content to print in the pdf.
require_once APPLICATION_PATH . 'library/tcpdf/tcpdf.php';
$pdf = new TCPDF("L", "mm", "A4", false, 'ISO-8859-1', false);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetFont('helvetica', '', 11, '', true);
$pdf->SetMargins(1, -1, -1, false);
//$pdf->SetFont('dejavusans', '', 12);
//whole TCPDF's settings goes here
$this->view->songs = $releaseSongs;
$this->view->release = $releasInformation;
$htmlcontent = $this->view->render('exportpdf.phtml');
// output the HTML content
$pdf->AddPage();
$pdf->writeHTML($htmlcontent, true, false, true, false, '');
$pdf->lastPage();
$pdf->deletePage($pages + 1);
$pdf->Output($filename, 'D');
exit();
here are the few things that i did to correct my code.
used the custom fonts option to add the Ms arial unicode true type font.
I was adding the style tag with css classes where i was setting the font family inside the view which resulted in the garbage characters in case of non-english characters. This was the main mistake.
Here is he final working code
require_once(APPLICATION_PATH . 'library/tcpdf/tcpdf.php');
$pdf = new TCPDF("L", "mm", "A4", TRUE, 'utf-8', false);
$fontname = TCPDF_FONTS::addTTFfont(APPLICATION_PATH.'/../library/tcpdf/fonts/ARIALUNI.TTF','TrueTypeUnicode', '', 32);
$pdf->AddFont($fontname);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->setFontSubsetting(true);
$pdf->SetFont($fontname, '', 12, '', true);
$pdf->SetMargins(1, -1, -1, false);
//$pdf->SetFont('dejavusans', '', 12);
//whole TCPDF's settings goes here
$htmlcontent = $this->view->render('exportpdf.phtml');
// output the HTML content
$pdf->AddPage();
$pdf->writeHTML($htmlcontent, true, false, true, false, '');
$pdf->lastPage();
$pdf->deletePage($pages + 1);
$pdf->Output($filename, 'D');
The collation doesn't help if you want to work with UTF-8, it only determines the sorting order. What you propably need is to set the charset of the database connection, this you should set before you do any query/inserts:
// tells the mysqli connection to deliver UTF-8 encoded strings.
$db = new mysqli($dbHost, $dbUser, $dbPassword, $dbName);
$db->set_charset('utf8');
// tells the pdo connection to deliver UTF-8 encoded strings.
$dsn = "mysql:host=$dbHost;dbname=$dbName;charset=utf8";
$db = new PDO($dsn, $dbUser, $dbPassword);
Reading and writing your data with this connection, you should be able to set the encoding of your PDF to UTF-8.

TCPDF ImageSVG dynamic position in writeHTMLCell

I am creating a pdf using TCPDF and everything is rendering the way that I want it. There is an area that is dynamic where it writes a variable number of lines. This area is rendered using writeHTMLCell. After this is rendered I want to place a signature image using $pdf->ImageSVG in the area marked '{SIGNATURE HERE}'. What are the dynamic coordinates based on variable lines ahead of it to place it in the correct position.
Thank you for any help.
$tbl = '<p>It is hereby requested that you prepare for use on (check one) ';
if($appeal_non=='appeal') {
$tbl .= ' <u>[X] appeal</u> [ ]non-appeal* ';
}else{
$tbl .= ' [ ]appeal <u>[X] non-appeal*</u> ';
}
$tbl .= ' an original and <u>'.$quant.'</u> copies of the following:</p>';
$tbl .='<table cellspacing="0" cellpadding="1" border="0" >
<tr>
<td>DATE OF PROCEEDING</td>
<td>TYPE OF PROCEEDING <br />(e.g., trial, sentencing, motion, etc.)</td>
<td>NAME OF JUDGE</td>
</tr>';
$p=0;
foreach($proc_date as $proc){
$tbl .= '<tr>
<td>'.$proc.'</td>
<td>'.$proc_type[$p].'</td>
<td>'.$proc_judge[$p].'</td>
</tr>';
$p = $p + 1;
}
$tbl .= '</table>
<p>I agree to pay for the preparation and any copies ordered of the transcript(s) for the above date(s) pursuant to R. 2:5-3(d).</p>
<table cellspacing="0" cellpadding="1" border="0" >
<tr>
<td><p> <br />{SIGNATURE HERE}<br/> </p></td>
<td>'.$sig_date.'</td>
</tr>
<tr>
<td><hr />SIGNATURE OF REQUESTING PARTY</td>
<td><hr />DATE</td>
</tr>
</table>
<p>Transcript fees are set by New Jersey Statute 2B:7-4. An additional sum or reimbursement may be required prior to or at the
completion of the transcript order.</p>
<p style="text-align:center;">DEPOSIT ATTACHED: $<u>'.$depositAmount.'</u></p>
';
$pdf->writeHTMLCell(0, '', '', '', $tbl, 1, 1, false, true, 'L', true);
$tbl = '<table cellspacing="0" cellpadding="1" border="0" >
<tr>
<td colspan="2">* Only the Supervisor of Court Reporters should receive copies of non-appeal transcript requests.</td>
</tr>
<tr>
<td width="5%">CC:</td>
<td width="95%">1. CLERK, Appellate Division, or CLERK, Supreme Court (see INSTRUCTIONS above)</td>
</tr>
<tr>
<td width="5%"></td>
<td width="95%">2. County Supervisor of Court Reporters _______</td>
</tr>
<tr>
<td width="5%"></td>
<td width="95%">3. Other attorneys/<span style="border-bottom: 1px solid;">Pro</span> <span style="border-bottom: 1px solid;">Se</span> parties _________</td>
</tr>
</table>';
//$sigY = $pdf->SetY($sigY);
$pdf->writeHTMLCell(0, '', '', '', $tbl, 1, 1, false, true, 'L', true);
//$sigY = $pdf->GetY();
//$sigY2 = $sigY - 40.2;
//$pdf->writeHTMLCell(0, '', '', '', '<p>'.$sigY.'<p>', 1, 1, false, true, 'L', true);
$pdf->ImageSVG($file='#'.$sig_code, $x='', $y='$sigY2', $w='80', $h='50', $link='', $align='B', $palign='L', $border=0, $fitonpage=true);

Categories