Google docs iframe - not show every pdf file - pdf

I'm using in my site with Google docs iframe to preview PDF files and last 2 weeks I have problem preview some of them, really don't understand why some are ok.
I'm using it like this:
<iframe id="pdfviewer" src="http://docs.google.com/gview?embedded=true&key=AIzaSyAnlkbh2TXRyCQMMWj2LQ6EY1fdqxNHf14&url=http://s3.amazonaws.com/DvarMalchus/chumash/דברים/נצבים/6.pdf&embedded=true" frameborder="0" width="100%" height="100%"></iframe>
I got this error - "no preview available":

Related

View linked PDF as popup within Google Sheets [duplicate]

I want to display a PDF inside a Dialog of a Google Spreadsheet Add-on Dialog.
more about apps script dialog can be found here
https://developers.google.com/apps-script/guides/html/
<iframe id="iframe" src="https://www.w3docs.com/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf" frameborder="0" height="500px" width="100%"></iframe>
When I inspect, I see the message Resource interpreted as Document but transferred with MIME type application/pdf: "https://www.w3docs.com/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf".
Answer:
You can embed the Google viewer to display the PDF using an <iframe>.
Code:
<iframe src="https://docs.google.com/viewer?url=https://www.w3docs.com/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf&embedded=true" height="1080" width="1920"></iframe>
Just make sure to change the height and width attributes of the <iframe>.

Fit PDF page in container using ngf-thumbnail

I have the following line of code to embed pdf in HTML
<embed ngf-thumbnail="factura.picFile" id="factura_prev_pdf" ng-show="factura.preimageext=='pdf'" class="view_complete_image" type='application/pdf'>
As you can see I'm using ngf-thumbnail to show the pdf.
Javascript attached to the id just get the extension, not important here.
ng-show say true if extension id pdf and the css class adapt the pdf to the container size.
The thing is that the pdf preview is adapted to the width and height but the page is not visualized entirely.
Any idea ?
I saw things like Zoom to fit: PDF Embedded in HTML
But it doesn't work to me since I'm not using
EDIT what I see now is that you can modify a pdf url like http.thingthing.pdf#view=fit to make page fit but my files are loaded from local so it creates a blob:url where I cannot put this view=fit.
It's possible to convert this blob url to a normal url with the pdf extension?
Finally I achieved the following:
<img ngf-thumbnail="factura.picFile" id="factura_prev_image" class="view_complete_image">
<embed ngf-thumbnail="factura.picFile" id="factura_prev_pdf" ng-show="factura.preimageext=='pdf'" class="view_complete_image" type='application/pdf'>
<img src="{{ factura.image.url }}" ng-show="factura.preimage && factura.preimageext=='jpg'" id="factura_image" class="view_complete_image">
<embed src="{{ factura.image.url }}#view=fit" ng-show="factura.preimage && factura.preimageext=='pdf'" class="view_complete_image" type='application/pdf'>
As you can see, in the first 2 lines I'm using ngf-thumbnail... This two fields contains local files so to visualize it we get a Blob Url, in this way I couldn't add the #view=fit that allows me to visualize the entire pdf page.
In the last 2 lines we get pdf's that are uploaded to a server so we get a normal url.
In this way I can add the #view=fit so the page fits.
Hope it helps to someone.
This answer is to know how to fit a pdf page, but I'm not answering to fit the page when we get a Blob Url.

iFrame Facebook app to show it on Website

There is an app on Facebook which I want to show onto my Website. Is there a way which allow me to do that?
Here is a link to the Facebook app which I want embed onto my website
https://apps.facebook.com/quranic_verses/?fb_source=timeline
I have tried to iFrame the app but it is not working for me,
<iframe
src="https://apps.facebook.com/quranic_verses/"
width="100%"
height="310"
scrolling="no"
frameborder="0" align="center">
</iframe>
Thanks, appreciated!
Facebook doesn’t allow their pages to be displayed inside foreign frames.
You could of course embed the app’s URL, that gets displayed inside the canvas iframe on Facebook, directly (https://quran.io/facebook/tab/, or https://quran.io/ for a larger version).
But before you do so, you should check with the owner if they want you to do so or not.

Asp.net MVC4, Mobile Safari, iFrame - add link to each page of a multi-page pdf document

While http://www.example.com/my.pdf#pageX works on the iPad to open the page "X", this does not work while the pdf is embedded in an iFrame. Has any of you has a solution how to link to a specific page of a pdf document in an iFrame on the iPad, or a similar solution that will show a specific page of a pdf document within an html page?
I have been looking for a solution for months now and have not come across the solution yet. Tried google doc viewer and tried to go to a specific page using almost all the solutions posted on the web (http://stackoverflow.com/questions/12290148/link-to-specific-page-on-google-document-viewer-on-ipad) but those solutions seem dated and do not work.
Any help is appreciated.

Attempting to use <iframe> tag to embed YouTube videos

I am using the following line of code to embed a YouTube player onto a new webpage. I've got over 200 videos online from 50 or so different performers. I'd like to create a page with all of the performers listed and then when you click on that performer's name their playlist will pop into a solo YouTube player. I can't seem to find a way to exchange the list=PLplaylist_ID to a variable that can be passed when the viewer clicks on a particular name. I need to use the tag due to the flash-not-playing-on-iPad-issue :)
iframe id="ytplayer" type="text/html" width="853" height="480"
src="http://www.youtube.com/embed/?listType=playlist&list=PLplaylist_ID&modestbranding=1&rel=0&autohide=1"
frameborder="0" />
Any help would be appreciated!
Ron
iframe never will play video for you.
It is just HTML container. What u need is launch html page inside iframe with YouTube player code inside.
For that You can try native Video TAG with fallback to flash (long way, reinvent bicycle ) or you can try to load in iframe : http://flowplayer.org. or http://videojs.com/