Category : dompdf

When generating the pdf with page-break-before after 3rd rows the design is breaking down. Here is my code <!DOCTYPE html> <html lang="en"> <head> <title>DOM-PDF</title> </head> <body> <table style="width:100%;"> <thead> <tr> <th>Serial</th> <th>Name</th> <th>Roll</th> <th>Info</th> </tr> </thead> <tbody> @php $n = 0; for($i=0;$i<10;$i++){ @endphp <tr style="text-align:center;"> <td>1</td> <td>Rashedul Hasan</td> <td>1208039</td> <td>I am an employee.</td> </tr> @php ..

Read more

I am trying to generate a view into a pdf, no images, just html but it looks nothing like how it should. This is how the webpage looks And this is how the pdf looks My blade view: @extends(‘layouts.app’) @section(‘content’) <div class="container"> <div class="row justify-content-center"> <a href="/download"> <button class="btn btn-primary">Download PDF</button> </a> </div> <br> <div ..

Read more

I am new to laravel , how to export into PDF once i search the data. not all only searched Data. here is the search Function public function search(Request $request) { //dd($request->camp_id); $camp_id=$request->camp_id; $school_level=$request->school_level; $school_shift=$request->school_shift; $school_type=$request->school_type; if($request->has(‘camp_id’) && !empty($request->input(‘camp_id’))||$request->has(‘school_level’) && !empty($request->input(‘school_level’))||$request->has(‘school_type’) && !empty($request->input(‘school_type’))||$request->has(‘school_shift’) && !empty($request->input(‘school_shift’))) $schools=School::where(‘camp_id’,$camp_id) ->orWhere(‘school_level’,$school_level) ->orWhere(‘school_type’,$school_type) ->orWhere(‘school_shift’,$school_shift) ->get(); else $schools=School::where(‘school_active’,’Active’); return view(‘reports/search’,compact(‘schools’)); } ..

Read more

I am using barryvdh dompdf for my project, I am also new with laravel framework. I am trying to generate a pdf based on a query that will return one row. The error message is: "Trying to get property ‘schedule_date’ of non-object". This is my function in my controller: public function downloadPAasPDF($id) { $decoded_id = ..

Read more

So I’m trying to use dompdf with laravel, even though I use the ‘use PDF’ it’s still error. Here is my controller <?php namespace AppHttpControllers; use RealRashidSweetAlertFacadesAlert; use IlluminateHttpRequest; use IlluminateSupportFacadesDB; use AppPasien; use IlluminateSupportFacadesRedirect; use PDF; class PasienController extends Controller { /** * Display a listing of the resource. * * @return IlluminateHttpResponse */ ..

Read more

I am using barryvdh/laravel-dompdf to load PDF’s in my application. I need to load custom fonts in the pdf. To do this, I downloaded my external fonts and copied the folder in storage/fonts. I have used css to get the fonts from my storage location as follows: @font-face { font-family: ‘Berlin Sans FB’; src: url("{{asset(‘fonts/berlin-sans/BerlinSansFB-Reg.woff2’)}}") ..

Read more