I just make a simple html page and write content to it. I created a link when I click on that link the content of the page will converted into PDF file, I have implemented this using laravel dompdf -> https://github.com/barryvdh/laravel-dompdf . Now, My problem is that all things doing good, but the PDF that is generated after click will shows that link in the PDF file. How to remove that button from PDF file. My code :
My controller : ItemController.php
class ItemController extends Controller
{
public function pdfview(Request $request)
{
if($request->has('download')){
$pdf = \PDF::loadView('pdfview');
return $pdf->download('pdfview.pdf');
//return $pdf->stream();
}
return view('pdfview');
}
}
My route: web.php
Route::get('/pdfview',array('as'=>'pdfview','uses'=>'ItemController@pdfview'));
My view : pdfview.blade.php
<body>
<div class="container">
<div class="rows"><br/>
<a href="{{ route('pdfview',['download'=>'pdf']) }}"> Click to PDF </a>
<h2 align="Center"> What is PDF ? </h2><br/><br/>
<h4> Portable Document Format (PDF) is a file format used to present and exchange documents reliably, independent of software, hardware, or operating system.</h4>
</div>
</div>
</body>
Help me, If you understand my problem. Thanks
display: none;
? You'll want to use an appropriate media target, "dompdf" works for dompdf-only styles. – BrianS