How to use google embed pdf viewer in laravel 5.3? - laravel

I tried this
<div class="row" style="text-align: center;">
<iframe src="{{ asset('jurnal/' . $journal->file) }}&embedded=true" style="width:90%; height:500px;" frameborder="0"></iframe>
</div>
Shows me error : NotFoundHttpException in RouteCollection.php line 161:
Anyone can help please, thank you

You actually need to link to Google's viewer, not just your file...
<iframe
src="http://docs.google.com/gview?url={{ asset('jurnal/' . $journal->file) }}&embedded=true"
style="width:600px; height:500px;"
frameborder="0">
</iframe>
Also it looks like the link you are returning isn't a good link to the PDF file. If you go to that page in a browser, it shouldn't show you a NotFoundHttpException

Related

Display png images on github pages

I have an issue with github pages. The first image "logo.png" of my html page is not displaying.
Here is the error message in the console : Failed to load resource: the server responded with a status of 404 (). logo.PNG:1
My HTML code :
<div class="logo">
<a href="index.html"
><img
class="header__logo"
id="logo1"
src="assets/pictures/logo.PNG"
alt="FishEye Home page"
tabindex="0"
/>
</a>
</div>
I tried following sources for my image :
assets/pictures/logo.PNG
assets/pictures/logo.png
It doesn't work.
Any help ?
create a new issue on github repository.
copy and paste your image on new issue.
after it makes a url of you issue. Use it in your repository or ReadMe.md file.

not show image from public folder laravel

I created api for getting image from server and show user but when enter url in server shows (Sorry, the page you are looking for could not be found.)
notice: request work in localhost
Try below code :
<img alt="image name" src="{{ url('image/imagename.jpeg') }}" />
Try this to use public_path() function:
<img src="{{ public_path($IMAGE_PATH) }}">

Displaying video file on webpage with laravel

I have a video in the database and also the directory folder. I am trying to display the video on the webpage but I dont see it. Can you help me? heres my code:
<div class="" style="border:1px solid blue;"><video height="300" autoplay controls><source alt="video not playing" src="{{asset ('introvideos/' .Auth::user()->intro_video) }}">
</source>
</video>
</div>

Godoc stylesheet and javascript

I know Godoc -html generates HTML only without stylesheets and javascript, but once generated where can I get those from?
I got css and js from godoc.org but it seems the js doesn't work with the html markup that is generated by godoc
I just want to try this out without using godoc server
Example markup:
<div id="pkg-overview" class="toggleVisible">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Overview section">Overview ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Overview section">Overview ▾</h2>
<p>Hello World
</p>
</div>
</div>
You can try and have a look in tools#hg/godoc/static
You will find a godoc/static/godocs.js which might help.
It is used by godoc/static/godoc.html anyway.
godoc.html also uses:
godoc/static/style.css
godoc/static/jquery.treeview.css

facebook no comments

I`m using facebook comments plugin on my web page. When I post comment, it showing on the wall in the FB. But when i go to my web page from FB, no comments are showing.
Code:
`
<meta property="fb:app_id" content="166856086729262">
<div id="fb_comm" style="padding-left: 10px;>
<script src="http://connect.facebook.net/ru_RU/all.js#xfbml=1">
<fb:comments href="http://".$xid." width="750" num_posts="5"></fb:comments>
</div>
`
What is wrong?
You need to specify your site's URL instead of href="http://".$xid."
Facebook's plugin links between the application you're running and the URL.

Resources