TCPDF ImageSVG在writeHTMLCell中的动态位置

时间:2015-08-12 21:55:32

标签: php pdf tcpdf

我正在使用TCPDF创建一个pdf,一切都呈现出我想要的方式。有一个动态区域,它写入可变数量的行。使用writeHTMLCell呈现此区域。渲染完成后,我想在标有“{SIGNATURE HERE}”的区域中使用$ pdf-> ImageSVG放置签名图像。什么是基于其前面的可变线的动态坐标,以将其置于正确的位置。 谢谢你的帮助。

$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>&nbsp;<br />{SIGNATURE HERE}<br/>&nbsp;</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);

0 个答案:

没有答案