<?php 
header('Content-type: text/plain; charset=utf-8');
use App\Models\SettingModel;
$setting    = new SettingModel();
$app_setting  = $setting->get_application_setting();
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://fonts.googleapis.com/css?family=Hind:400,700&amp;subset=devanagari,latin-ext" rel="stylesheet">
  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Tiro+Devanagari+Hindi&display=swap" rel="stylesheet"> 
</head>
<body >

</style>
  <div >
    <?php 
      $path = $image_d;
      $type = pathinfo($path, PATHINFO_EXTENSION);
      $base64 = 'data:image/' . $type . ';base64,' . base64_encode($image_d);
    ?>
   <img src="<?php echo $base64; ?>" style="position:absolute; width: 297mm; 
    height: 210mm;">
  </div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:273px;left: 400px;color:#282828;"><?php echo session()->get('rechage_id'); ?></div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:321px;left: 400px;color:#282828;"><?php echo session()->get('d_name'); ?></div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:368px;left: 350px;color:#282828;"><?php echo session()->get('d_address'); ?>, <?php echo session()->get('d_area'); ?>, <?php echo session()->get('d_dist'); ?>, </div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:408px;left: 352px;color:#282828;"><?php echo session()->get('d_state'); ?> - <?php echo session()->get('d_pin'); ?></div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:461px;left: 460px;color:#282828;"><?php echo session()->get('donation_date'); ?></div>
  <div style="position:absolute; z-index:999;font-size:28px;font-weight:900;top:508px;left: 460px;color:#282828;">&#8377;<?php echo session()->get('donation_amount'); ?></div>
  <div style="position:absolute; z-index:999;font-size:25px;font-weight:900;top:552px;left: 410px;color:#282828;"><?php echo mb_convert_encoding($project->project_title, 'HTML-ENTITIES', 'UTF-8'); ?></div>
</body>
</html>
<style type="text/css">
@page {
  size: A4 landscape;
  margin: 0;
}
@media print {
  html, body {
    width: 297mm; 
    height: 210mm;
  }
  /* ... the rest of the rules ... */
}
</style>
<script type="text/javascript">
 // window.print();
 </script>