Postingan lainnya
Kelas Premium!
Belajar bikin website dari nol sekarang
Gunakan kupon "lebihcepat" untuk diskon 25%!
Gagal eksport data ke pdf
Pesan Errornya
Codenya:
<?php ob_start(); ?>
<style type="text/css">
table.page_header {width: 1020px; border: none; background-color: #3C8DBC; color: #fff; border-bottom: solid 1mm #AAAADD; padding: 2mm }
table.page_footer {width: 1020px; border: none; background-color: #3C8DBC; border-top: solid 1mm #AAAADD; padding: 2mm }
h1 {color: #000033}
h2 {color: #000055}
h3 {color: #000077}
img { width: 70px; }
</style>
<style type="text/css">
.tabel2 {
border-collapse: collapse;
margin-left: 20px;
}
.tabel2 th, .tabel2 td {
padding: 5px 5px;
border: 1px solid #959595;
}
img { width: 70px; }
div.kanan {
width:300px;
float:right;
margin-left:250px;
margin-top:-140px;
}
div.kiri {
width:300px;
float:left;
margin-left:20px;
display:inline;
}
</style>
<?php
include '../fungsi/koneksi.php';
?>
<table>
<tr>
<th rowspan="3"><img src="../gambar/kam.png" style="width:100px;height:100px" /></th>
<td align="center" style="width: 520px;"><font style="font-size: 18px"><b>PT. KINARYA ALIHDAYA MANDIRI <br> AREA PAMASUKA WILAYAH MAKASSAR</b></font>
<br><br>Jl. A.Pettarani No. 18 A7-A9 RT 001/RW 006 Kelurahan Tamamaung Kecamatan Panakkukang, Makassar<br> Telp : (0711) 355089 | Fax : (0711) 355180</td>
<th rowspan="3"><img src="../gambar/kam.png" style="width:100px;height:80px" /></th>
</tr>
</table>
<hr>
<p align="center" style="font-weight: bold; font-size: 18px;"><u>DATA PELAMAR KERJA</u></p>
<table class="tabel2">
<thead>
<tr>
<td style="text-align: center; "><b>No.</b></td>
<td style="text-align: center; "><b>ID Pelamar</b></td>
<td style="text-align: center; "><b>Gambar</b></td>
<td style="text-align: center; "><b>Nama Lengkap</b></td>
<td style="text-align: center; "><b>Alamat</b></td>
<td style="text-align: center; "><b>Nomor Handphone</b></td>
<td style="text-align: center; "><b>Posisi</b></td>
</tr>
</thead>
<tbody>
<?php
include "../fungsi/koneksi.php";
$no = 1;
$query=mysqli_query($koneksi, "select * from data_pelamar");
while($data=mysqli_fetch_array($query)){
?>
<tr>
<td style="text-align: center; width=15px;"><?php echo $no; ?></td>
<td style="text-align: center; width=70px;"><?php echo $data['id_datapelamar']; ?></td>
<td style="text-align: center; width=70px;"><img src="../admin_pengganti/foto.jpg/'<?php echo $data['gambar_pelamar']; ?>'"></td>
<td style="text-align: center; width=70px;"><?php echo $data['name']; ?></td>
<td style="text-align: center; width=120px;"><?php echo $data['address']; ?></td>
<td style="text-align: center; width=70px;"><?php echo $data['handphone']; ?></td>
<td style="text-align: center; width=50px;"><?php echo $data['posisi_dituju']; ?></td>
</tr>
<?php
$no++;
}
?>
</tbody>
</table>
<div class="kiri">
<p>Mengetahui :<br>Manajer KAM</p>
<br>
<br>
<br>
<p><b><u>Trisno Putro</u><br>NIK : 197810170371</b></p>
</div>
<div class="kanan">
<p>Mengetahui :<br>Admin Koordinator Lapangan</p>
<br>
<br>
<br>
<p><b><u>Rezky Septyawati</u><br>NIK : B0819052</b></p>
</div>
<!-- Memanggil fungsi bawaan HTML2PDF -->
<?php
$content = ob_get_clean();
include '../assets/html2pdf/html2pdf.class.php';
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'en', false, 'UTF-8', array(10, 10, 4, 10));
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->writeHTML($content);
$html2pdf->Output('data_pelamar.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
?>
0
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban