4 months ago

BarryVDH Something Weird Happening

Posted 4 months ago by artisticre

I am not sure how explain this. I have everything work great. But when the pdf has a second or third page, it triple displays the first column. For instance, I have this table row below. It usually prints at the top of the second page. The data is listed three times in the table row. It happens again in another one when there is a third page printed. I am baffled on how to fix this. If there is anything else I can show to try to fix this, I will add it here too

<td colspan="6">
<label for="ifnospouseattend" class="col-form-label text-md-left font-weight-bold">{{ __('If Answered No, please explain briefly:') }}</label>
<input type="text" disabled value="{{ $p->ifnospouseattend ?? 'N/A' }}">

PDF Print Controller

 public function sponsorpdfview(Request $request,$id)
        $sponsor_print = DB::table('users')
        ->join('profile', 'profile.user_id', '=', '')
        ->join('sponsorapp', 'sponsorapp.user_id', '=' ,'profile.user_id')

            ->where('', '=', $id)

            foreach($sponsor_print as $item){
                $item->homephone = $this->formatPhoneNumber($item->homephone);
                $item->cellphone = $this->formatPhoneNumber($item->cellphone);
            $name = $request->query('name', 'Sponsor');
            $pdf = PDF::loadView('registrar.sponsorpdfview', ['sponsor_print' => $sponsor_print, 'pdf' => true]);
            return $pdf->download("{$name} - SponsorApplication.pdf");


Please sign in or create an account to participate in this conversation.