I have a link to pdf file that located in the my Dropbox folder.
For example: https://dl.dropboxusercontent.com/1/view/gqo4etwy7nudtu2/JasperReports-Server-Visualize.js-Guide.pdf
By clicking on the link, I may download the file.
I want to embed the file on my site. I use the following code:
<iframe src="https://dl.dropboxusercontent.com/1/view/gqo4etwy7nudtu2/JasperReports-Server-Visualize.js-Guide.pdf?preview" height="100%" width="100%">
This browser does not support PDFs. Please download the PDF to view it: Download PDF
</iframe>
I tried to set two files, the link above and another one that I found on Google.
The link above unable to embed, and it's opened for download, all the other files embedded successfully.
How can I embed pdf file from Dropbox?
Found the Dropbox Embedder but not yet tested:
You need to create an account in the App Console and create an app to get the app key:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="YOUR_APP_KEY"></script>
Then you embed a Dropbox PDF file with the anchor tag:
<a
href="https://www.dropbox.com/s/u0bdwmkjmqld9l2/dbx-supporting-distributed-work.pdf?dl=0"
class="dropbox-embed"
data-height="300px"
data-width="600px"
></a>
More info here.
Related
How do I load a gdocs/etc file in an iframe within my web app?
Similar to how Dropbox loads in a gdoc file within their web app.
https://developers.google.com/drive/api/v3/reference/files.
Currently I am wiring the webViewLink into an iframe, the file loads,
but if you click on the gdocs header logo icon, the iframe will then crash.
Thoughts?
Thanks
<iframe src="https://docs.google.com/document/d/1lnFHup_-1XA0ollcwkjg6Y_NejiCxOmvuVlOvYk1yUo/edit?usp=drivesdk" width="100%" height="100%"></iframe>
We have a internal website where we have some links to pdf documents hosted on the webserver. If i open Chrome Dev-Tools(F12), and inspect the link and add an embed with the same pdf document, it will rather download the file instead of showing it. I have tried with embed and iframe, but i still get the same problem.
Original code:
<a id="id2239" href="http://example.com:8080/client/attachment/filename.pdf" class="act01">filename.pdf</a>
Screenshot:
Code that we would like to work:
<a id="id2239" href="http://example.com:8080/client/attachment/filename.pdf" class="act01">filename.pdf</a>
<div class="fgh"><embed id="fgh" src="http://example.com:8080/client/attachment/filename.pdf" type="application/pdf" width="400" height="400"></div>
Screenshot:
As you can see, it actually downloads the document instead of showing it in the screenshot above. Just shows a white space.
Code that works with another document:
I just found a pdf document on google, and put it into the tag, and it works. It shows the document in the embed, and doesn't download the document instead.
<a id="id2239" href="http://example.com:8080/client/attachment/filename.pdf" class="act01">filename.pdf</a>
<div class="fgh"><embed id="fgh" src="http://infolab.stanford.edu/pub/papers/google.pdf" type="application/pdf" width="400" height="400"></div>
Screenshot:
Question:
Why is the two examples different? Why does the internal document download, but the external document show embedded in the page?
How do i make it work with the file on our webservers as well?
Edit:
Screenshot of the pdf documents headings.
It depends on the content type in the response header. You may check if your web server sets proper header information, e.g. Content-Type: application/pdf.
"Chrome Dev-Tools(F12)" -> Network Tab, check the response headers.
I was facing the same issue. In my case the Content-Type of my files was "binary/octet-stream". I had to manually change it to "application/pdf" to resolve it
Use the <object> tag to embed PDF files in html:
<object id="fgh" data="http://example.com:8080/client/attachment/filename.pdf" width="400" height="400"></object>
I'm trying to download a file from a link in an HTML file in an Android Studio
Scenario:
Press on "Download" to download an APK file:
Download
I tried with opening google or other pages - it works.
And yes, my link is correct :D
I'm trying to embed my resume into a page on my weebly website. I've saved the file as a pdf, allowed link sharing, and followed the steps for embedding documents from Google docs. I've gotten as far as getting the file to display within the weebly app, but it doesn't appear live on the site once I publish it. The page just appears blank, though additional space appears to be taken up. Perhaps an important note is that I'm using my ipad to do this.
Here is the custom HTML code I'm using within iframe generated from the above mentioned website:
<iframe style="width: 900px; height: 900px;" src="http://docs.google.com/gview?url=https://ivanglinski.weebly.com/uploads/5/7/9/5/57950797/ivan_glinski_resume_3_24.pdf&embedded=true" height="240" width="320" frameborder="0">
Every Weebly site comes with an "Embed Code" element which is available in the Weebly Editor (while building/editing/updating your site and its pages).
Get the "embed code" from Google for the GDrive doc you want to embed.
Drag an instance of the "Embed Code" element onto the page of your Weebly site where you want the GDrive doc to be displayed.
Click on the element you just instantiated, and paste the "embed code" from Google for the GDrive doc (from step 1) into the appropriate configuration field of the Embed Code element.
Publish your site
Test things are working, and if not, you may need to adjust permissions on the GDrive doc.
I have a PDF file having embedded documents attached.
I am not able to download the attachments or view the attachments embedded within the PDF file from Chrome.
However, I am able to download the attachments if i right click on the link and use 'save link as' menu to save the file.
What should I do ?
You're already doing it. The native Chrome PDF viewer simply doesn't support attachments. You can't even see that they're there. You have to download the file and open it in a more capable viewer.