Closed davyyg closed 2 years ago
Hello,
I am trying to center my page:
HargaController.php
// bikin pdf $pdf = PDF::loadView('pdf.document', compact('body_pdf')); $fn = 'Penawaran_'. str_replace(" ", "_", $nama) .'_'. date('YmdHis') . '.pdf'; $file_name = storage_path() . '/app/public/images/quotation/' . $fn; // Simpan file pdf ke storage $pdf->save($file_name);
pdf/document.blade.php
<html> <center><h3>Surat Penawaran Harga</h3></center> <br><br> {!! $body_pdf !!} </html>
The result is The title text align left not in the center. I wonder why the center does not work ?
hi. you can use center with below way :
<div style="width:100%; text-align:center;"><h3>Surat Penawaran Harga</h3></div>
this way work fine for me.
Hello,
I am trying to center my page:
HargaController.php
pdf/document.blade.php
The result is The title text align left not in the center. I wonder why the center does not work ?