Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (trim($_POST['pdfid']) == "All") {
- $qry = "select master.hcid,hcmaster.hcname,master.instdate,master.sendname,master.address,statemaster.statename,master.district,master.mobile,master.receiptm,master.subject,master.disposal,master.dispdate,MASTER.dispdetail,master.remark
- if ($qry) {
- $tbdata = '';
- $con = mysqli_connect("localhost", "root", "", "dakmanagement");
- $res = mysqli_query($con, $qry) or die("not fire");
- if (mysqli_num_rows($res)!=0)
- {
- $i = 1;
- while($row=mysqli_fetch_array($res, MYSQLI_ASSOC))
- {
- $tbdata .= '<tr><td colspan="3"> </td></tr><tr><td width="10%" align="left">' . $i .
- }
- }
- // create new PDF document
- $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
- // set document information
- $pdf->SetCreator(PDF_CREATOR);
- $pdf->SetAuthor('Vinay Soni');
- $pdf->SetTitle('High Court');
- $pdf->SetSubject('High Court');
- $pdf->SetKeywords('High Court');
- // set margins
- $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
- $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
- $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
- // set auto page breaks
- $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
- // set some language-dependent strings (optional)
- if (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {
- require_once(dirname(__FILE__) . '/lang/eng.php');
- $pdf->setLanguageArray($l);
- }
- // ---------------------------------------------------------
- // set font
- $pdf->SetFont('dejavusans', '', 10);
- // add a page
- $pdf->AddPage();
- // writeHTML($html, $ln=true, $fill=false, $reseth=false, $cell=false, $align='')
- // writeHTMLCell($w, $h, $x, $y, $html='', $border=0, $ln=0, $fill=0, $reseth=true, $align='', $autopadding=true)
- // create some HTML content
- $html = '
- <div style="width:100%; float:left;">
- <p style="font-weight: bold; font-size: 20px; text-align: center;">RAJASTHAN HIGH COURT BENCH JAIPUR.<br/>
- <span style="font-weight: bold; font-size: 18px; text-align: center;">Hon`ble CJ Secretariat</span>
- </p>
- </div>
- <table width="100%" border="1">
- <tr >
- <th align="left">S.No.</th>
- <th align="center">Complete Detail of Records</th>
- <th align="right" >Inst_date<br/>Disp_date</th>
- </tr>
- ' . $tbdata . '
- </table>
- ';
- // output the HTML content
- $pdf->writeHTML($html, true, false, true, false, '');
- // reset pointer to the last page
- $pdf->lastPage();
- //Close and output PDF document
- $pdf->Output('Report.pdf', 'I');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement