Reputation: 1
I read the links of the pdf document in a new page using the code below but I only have the blank page
@section('content')
<div class="content">
<div class="container-fluid">
<div class="card card-plain">
<div class="card-header card-header-primary">
<h4 class="card-title">Cotations</h4>
<p class="card-category">lorem ipsum lorem ipsum
</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-12">
<a href="D:\Cumputers\Dark Deb\Hunchly-Dark-Web-Setup.pdf" target="_blank">Hunchly-Dark-Web-Setup.pdf</a>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
Upvotes: 0
Views: 49
Reputation: 1
Thanks @Otavio and @jass. I tried it with ifram and it work.
<iframe style="border:none" src="{{URL::asset('/material/docs/laravel-PDF/laravel.pdf')}}" scrolling="auto" height="700" class="col-md-10"></iframe>
I wanted to specify also that we had to use the link the way laravel does it
Upvotes: 0
Reputation: 1558
you can use object tag
@section('content')
<div class="content">
<div class="container-fluid">
<div class="card card-plain">
<div class="card-header card-header-primary">
<h4 class="card-title">Cotations</h4>
<p class="card-category">lorem ipsum lorem ipsum
</p>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-12">
<!-- pdf here -->
<object width="400" height="400" data="http://plugindoc.mozdev.org/testpages/test.pdf">
</object>
<!-- pdf here -->
<!-- or iframe -->
<iframe src="http://plugindoc.mozdev.org/testpages/test.pdf" width="400" height="400" frameborder="0"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
Upvotes: 0
Reputation: 12501
You can check out this post about embedding PDF files on your webpage. HTML embedded PDF iframe
What I've done in the past is used an iframe to achieve this, like so:
<iframe style="border:1px solid #666CCC" title="My PDF" src="my-pdf.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
Upvotes: 1