[php] pdf
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- $body = '
- <head>
- <!-- Metas -->
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <meta name="keywords" content="Sukabumi Wedding">
- <meta name="description" content="Sukabumi Wedding">
- <meta name="author" content="">
- <!-- Plugins -->
- <link rel="stylesheet" href="assets/css/plugins.css">
- <!-- Core Style Css -->
- <link rel="stylesheet" href="assets/css/style.css">
- <link rel="stylesheet" href="assets/css/bootstrap.min.css">
- </head>
- <main class="main-bg">
- <!-- ==================== Start Slider ==================== -->
- <header class="work-header section-padding pb-0">
- <div class="container mt-80">
- <div class="row">
- <div class="col-12">
- <div class="caption">
- <h6 class="sub-title">Shopping</h6>
- <h1>Cart.</h1>
- </div>
- </div>
- </div>
- </div>
- </header>
- <!-- ==================== End Slider ==================== -->
- <!-- ==================== Start cart ==================== -->
- <section class="shop-cart section-padding">
- <div class="container">
- <div class="row justify-content-center">
- <div class="col-lg-11">
- <div>
- <table>
- <thead>
- <tr>
- <th>Product</th>
- <th>Price</th>
- <!-- <th>Quantity</th> -->
- <th>Subtotal</th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td data-column="Product">
- <div class="d-flex align-items-center">
- <div>
- <div class="img icon-img-80">
- <img src="assets/imgs/shop/5.jpg" alt="">
- </div>
- </div>
- <div class="ml-30">
- <h6>Men Hooded</h6>
- </div>
- </div>
- </td>
- <td data-column="price">
- <h5 class="main-color4 fz-18">$130.00</h5>
- </td>
- <td data-column="Subtotal">
- <h5 class="main-color4 fz-18">$130.00</h5>
- </td>
- <td class="remove">
- <a href="#0">
- <span class="pe-7s-close"></span>
- </a>
- </td>
- </tr>
- <tr>
- <td data-column="Product">
- <div class="d-flex align-items-center">
- <div>
- <div class="img icon-img-80">
- <img src="assets/imgs/shop/5.jpg" alt="">
- </div>
- </div>
- <div class="ml-30">
- <h6>Men Hooded</h6>
- </div>
- </div>
- </td>
- <td data-column="price">
- <h5 class="main-color4 fz-18">$130.00</h5>
- </td>
- <td data-column="Subtotal">
- <h5 class="main-color4 fz-18">$130.00</h5>
- </td>
- <td class="remove">
- <a href="#0">
- <span class="pe-7s-close"></span>
- </a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="row mt-80">
- <div class="col-lg-6">
- <div class="coupon mt-40">
- <h4>Discount</h4>
- <p class="fz-13">Enter your coupon code if you have one.</p>
- <form action="contact.php">
- <div class="form-group d-flex mt-30">
- <input type="text" name="coupon_code">
- <button type="submit" class="butn butn-md butn-bord">
- <span>Apply</span>
- </button>
- </div>
- <span class="fz-13 opacity-7 mt-10">Coupon code</span>
- </form>
- </div>
- </div>
- <div class="col-lg-4 offset-lg-2">
- <div class="total mt-40">
- <h4>Cart totals</h4>
- <ul class="rest mt-30">
- <li class="mb-5">
- <h6>Subtotal : <span class="fz-16 main-color4 ml-10">$130.00</span></h6>
- </li>
- <li>
- <h6>Total : <span class="fz-16 main-color4 ml-10">$260.00</span></h6>
- </li>
- </ul>
- <a href="shop-checkout.html" class="butn butn-md butn-bg main-colorbg4 mt-30">
- <span class="text-u fz-13 fw-600">Proceed to checkout</span>
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- ==================== End cart ==================== -->
- </main>';
- // dd($html);
- $mpdf = new \Mpdf\Mpdf(['mode' => 'utf-8', 'format' => 'A4', 'margin_left' => 15, 'margin_right' => 15, 'margin_top' => 10, 'margin_bottom' => 25, 'margin_header' => 0, 'margin_footer' => 0]);
- $html = $body;
- // $mpdf->SetFooter($footer);
- // $mpdf->WriteHTML($this->stylesheet, \Mpdf\HTMLParserMode::HEADER_CSS);
- $mpdf->WriteHTML($html, \Mpdf\HTMLParserMode::HTML_BODY);
- $filename = 'assets/test_pdf.pdf';
- $mpdf->Output("$filename", \Mpdf\Output\Destination::FILE);
- $return = $filename;
Editor
You can edit this paste and save as new: