All Questions

Tagged with
Filter by
Sorted by
Tagged with
313 votes
14 answers
486k views

How do I force files to open in the browser instead of downloading (PDF)?

Is there a way to force PDF files to open in the browser when the option "Display PDF in browser" is unchecked? I tried using the embed tag and an iframe, but it only works when that option is ...
elloalisboa's user avatar
  • 3,203
65 votes
6 answers
162k views

Hiding the toolbars surrounding an embedded pdf?

Though I think the answer maybe in this other question's answer concerning the pdf specification, is it possible to not display the adobe acrobat toolbars in an embedded pdf document?
leeand00's user avatar
  • 25.9k
44 votes
6 answers
195k views

How to embed PDF file with responsive width

I'm embedding pdf files using something like this: <div class="graph-outline"> <object style="width:100%;" data="path/to/file.pdf?#zoom=85&scrollbar=0&toolbar=0&navpanes=0" ...
emersonthis's user avatar
40 votes
4 answers
45k views

How to specify parameters to google chrome adobe pdf viewer?

I have an embed tag like this: <embed src="../../Content/PDF/StockReport.pdf#zoom=50" width="100%" height="100%"> the #zoom=50 is a parameter that tells the pdf reader to zoom to 50%. This ...
BentOnCoding's user avatar
  • 27.8k
37 votes
5 answers
198k views

how to display base64 encoded pdf?

I have to display base64 pdf in new tab. I am using below code var windo = window.open("", ""); var objbuilder = ''; objbuilder += ('<embed width=\'100%\' height=\'100%\' ...
dnyaneshwar's user avatar
  • 1,294
28 votes
8 answers
32k views

HTML Embedded PDF's & onload

I'm embedding a PDF in a web page with the following html :- <object id="pdf" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="1024" height="600"> <param name="SRC" value="/...
user avatar
23 votes
8 answers
80k views

Embed PDF in mobile browsers

I have the code below which is a perfect solution to what I need, which would essentially be embedding any of JPG, GIF, PNG or PDF files in my webpages. It works perfectly in PC browsers, but a ...
Lane's user avatar
  • 386
13 votes
2 answers
14k views

Change background color in PDF viewer using either embed, object or iframe methods

I've been playing around with different methods of displaying PDFs with the goal of finding a way of changing the grey background to white. Here is a simple example using object tags (I get the same ...
A-frame's user avatar
  • 293
12 votes
1 answer
2k views

Google PDF Viewer default fit to width embed

When I embed a pdf using google's PDF viewer <iframe src="https://drive.google.com/viewerng/viewer?embedded=true&url=http://jugglegood.com/out/scot-nery-resume-grand.pdf" ></iframe> ...
Scot Nery's user avatar
  • 679
12 votes
1 answer
3k views

Force PDF to display inline, even when Content-Disposition says otherwise?

I am embedding PDF in an IFRAME from a server that is unfortunately serving them as Content-Disposition:attachment;. Is there any way to force the browser to display the PDF inline? Unfortunately I ...
Jordan Reiter's user avatar
11 votes
3 answers
66k views

PDF Embedded in <object> or <embed> tag not loading in IE 11

I have to create an Image slider for which I am using: "Galleriffic plugin > http://www.twospy.com/galleriffic/", in the Image slider, along with images, I have to show PDFs for some cases. And to ...
UID's user avatar
  • 4,494
11 votes
4 answers
91k views

embed PDF file in html using object tag

I m embeding a pdf document into my html code. For this i have wrote this code. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org /TR/html4/loose.dtd"> <html ...
mysterious's user avatar
  • 1,458
10 votes
8 answers
57k views

How to embed a PDF file in a web site?

I simply want to embed a PDF file in a web site. The best solution I've found is Google Docs Viewer (http://docs.google.com/viewer), but it does not work for IE and obviously that is not going to ...
JWM's user avatar
  • 369
10 votes
2 answers
27k views

Show PDF file on webpage as Carousel with each page as a separate slide

I am facing a challenging assignment - create a slider carousel which will be displaying separate pages of a single multi-page PDF as a separate slides on webpage. Check out the image below to get the ...
Acidon's user avatar
  • 1,324
9 votes
3 answers
987 views

How to switch embed element type from PDF stream to text stream

In my JSP web application I am using the embed element to display a PDF. <embed src="someurl" width="900"> The someurl will return a PDF stream in one case and a text stream in another case: ...
Rookie007's user avatar
  • 1,239
8 votes
5 answers
16k views

How to embed a Font in a PDF with RDLC

i am using Microsoft.Reporting.WebForms.LocalReport to generate some PDF, everything works like a charm, but now evil marketing wants to use a custom font (they are using such crazy arguments as "...
marc.d's user avatar
  • 3,834
8 votes
3 answers
4k views

base64 embeded PDF files won't render in Chrome

Some PDF files won't render in Chrome browser but will render fine in Firefox. All files render fine in all browsers if emeded directly. <object id="content-view" :data="content_view.base64" type="...
kopz's user avatar
  • 758
6 votes
3 answers
11k views

Jump to a particular page when embedding pdf document in HTML

I am trying to embed pdf file in HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <head> <title></title> </...
Koteg's user avatar
  • 497
5 votes
5 answers
13k views

Displaying pdf files in a web page from a sql database directly without needing to save them to the server file system

I'm currently using an html embed tag to display a pdf file that is saved on the local server. Is there a wayo to display a pdf file on my page without having to save it to the local file system of ...
Aaron Patten's user avatar
5 votes
1 answer
7k views

Open a PDF in browser 2 page up view

Is there a way to embed a pdf in a page and when it opens, to show two pages at once, side by side? I want to simulate what happens when you open a pdf in Adobe Acrobat, then check "Two page View" ...
binderbound's user avatar
5 votes
1 answer
25k views

embedding pdf file within html with 100% width and height?

I'm trying to embed a pdf document in html code, and I tried three different approaches, which actually gave me the same result: <embed src="files/cv_aaragon_en.pdf" width="100%" height="100%"> ...
aaragon's user avatar
  • 2,414
5 votes
1 answer
4k views

How to get rid of Helvetica in iText XMLWorker?

We're using iText to generate PDF files from Java code, which works pretty well in most cases. A few days ago we started to generate PDF/A instead of normal PDF files which needs to embed all fonts. ...
Daniel Bleisteiner's user avatar
5 votes
0 answers
445 views

How do I execute a content script in a chrome extension on a pdf viewed with chrome's viewer?

I want to be able to scroll using javascript on a pdf being viewed in chrome. However, the normal approach of using window.scrollBy() does not work, because the pdf itself is embedded in the page, so ...
Dan Stoyell's user avatar
5 votes
1 answer
8k views

Embed PDF in IE10

I need to embed a PDF in an HTML document that can be viewed in IE8/9/10, firefox, and chrome on a .Net application. I need to stay away from 3rd party libraries because we need to meet a release ...
mrK's user avatar
  • 2,238
4 votes
1 answer
35k views

html: print() embed file

I am showing a pdf inside a html using: <embed id="print" src="file.pdf" type="application/pdf" width="100%" height="100%"> I would like to create a button that prints that file. I thought ...
Rps's user avatar
  • 277
4 votes
2 answers
3k views

Is it possible to embed java program (or applet) in a pdf file

I was wondering if it is possible to embed a java program or an applet into a pdf file. Any way of achieving this is okay for me (latex, adobe acrobat pro, etc). Thanks in advance.
Pouya's user avatar
  • 1,276
4 votes
1 answer
31k views

Embed PDF in HTML

I need to embed a PDF document inside an HTML page. The PDF is dynamically generated, i.e., not a static file, but rather a byte-array generated using a PDF toolkit (in my case, "Apache PDFBox"). I ...
gene b.'s user avatar
  • 11.3k
4 votes
2 answers
5k views

Adding s3 signed url in embed for a pdf doesn't work

The url which looks like https://abc.s3.ap-south-1.amazonaws.com/1/2/4/2018/26/pdf.pdf_1537903203247/V0/output/pdf.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=Q434A%2F200926%2Fap-south-...
SHIKHAR SINGH's user avatar
4 votes
1 answer
1k views

Blazor : embed shows pdf correctly in Firefox, but empty in Chrome and Edge

I'm using "embed" to show pdf file in Razor component of Blazor Server <embed src="@showedPdfContent" visible="false" width="1100" height="730" ...
Quang Vinh Tran's user avatar
4 votes
1 answer
10k views

Embedded base64 pdf won't display in IE when using iframe

I wish to display a pdf file which is embedded using base64 encoding in an html. Below is the code I have written for this. The pdf file is displayed in Chrome and firefox but not in Internet Explorer ...
user2440387's user avatar
4 votes
1 answer
7k views

Embed a local PDF in HTML page

Situation: Web application running on a remote server is displaying PDFs. PDF document is stored on client's PC (location is known). Is there any way to embed that PDF into HTML page with local path? ...
Smackus Maximus's user avatar
4 votes
1 answer
4k views

How to embed a Font in solution to use for PDF with RDLC

I have an RDLC report created via Webforms.LocalReport that uses a few custom fonts that I have installed on my dev machine. This works well, and embeds the fonts in the PDF so that others don't need ...
brad's user avatar
  • 105
3 votes
3 answers
13k views

Attempting to view pdf file though iframe using jQuery modal popup

I am trying to display a pdf file though iframe using jQuery modal popup, however, it's asking the user to download the file when the page loads instead of the pdf file being embedded inside the ...
Sai's user avatar
  • 703
3 votes
2 answers
3k views

C# WebBrowser won't display embedded object

This may be a dumb question, but I just can't get it to work. I'm trying to embed a pdf file into a webbrower in a c# program. Simple right? I thought so, but it proved otherwise. Here's the html code:...
Der Schornsteinfeger's user avatar
3 votes
1 answer
2k views

Updated ways to embed a PDF file in a page, since 2008?

I just landed a big contract that includes embedding PDF pages on html pages. I found this question and answer straight away: Recommended way to embed PDF in HTML? My question is this, is the answer ...
Ferdia O'Brien's user avatar
3 votes
1 answer
948 views

Embed PDF media file in Django template

The question is that I want to embed a PDF file through <embed>, <iframe> tag, or similar in a Django template using {{ object.file.url }}, which is presumed to be a file saved in the /...
Tatan Parker's user avatar
3 votes
1 answer
15k views

Embedding PDF Files in chrome

I have a page that contains PDF File in it. Luckily, it works in IE. But when I run it in chrome, it gives me this error : I googled it and it seems like chrome isn't already allowing us to view PDF'...
JanLeeYu's user avatar
  • 991
3 votes
0 answers
2k views

Zoom and other parameters on embedded PDF object not working

I am embedding a PDF using <object> into a page. I want the PDF to display as only a portion of the page, and I would like for the whole first page to show in the visible area (similar to an ...
Dan's user avatar
  • 9,438
3 votes
0 answers
275 views

Issues printing embedded PDF

I have embedded a pdf object in a webpage. When I print this page, the embedded object does not show in the printout. The only way to print the pdf is to use the print function of the plugin, however ...
user1653604's user avatar
2 votes
1 answer
1k views

SSRS - fonts are not emedded into pdf files

I am using SSRS 2017 to generate reports, I've installed a new font to use with the reports but the font is getting embedded in all files types except the pdf files. Here are the font details: When I ...
Merna Mustafa's user avatar
2 votes
2 answers
2k views

Alternate method of inserting a .PDF file into HTML page

Currently I'm using an embed tag with the src directed to the location of the .pdf however the embed tag does not allow for z-index manipulation or other div tags to be placed over it. After ...
sadmicrowave's user avatar
  • 40.5k
2 votes
1 answer
2k views

How can i embed javascript code to pdf and get it to execute?

i am talking a malware analysis class in uni and in the previous lesson we talked about malicious pdf documents and embeded executables, as well as embeded javascript that runs once the pdf is opened. ...
bd55's user avatar
  • 65
2 votes
1 answer
23k views

All kinds of document viewer in react

I want to make document viewer in react which shows document in same page as popup as that is used in slack web application? It should view all kind of document files. Can anyone guide me how to ...
Dipendra Hamal's user avatar
2 votes
1 answer
334 views

Adobe PDF Embed apis.gotoLocation() forces pdf to refresh

Adobe PDF Embed seems to always reload the pdf instead of just navigating to the correct page (as changing the page number within the iframe does). Is there a way around this? Code being used: ...
winstonth's user avatar
2 votes
2 answers
707 views

Trying to embed simple UTF16 character into manually created PDF but failing

I'm trying to manually create a PDF document (using the PDFGen C code on github). This is on a small footprint device with limited storage. All works fine until I want to embed (say) the Unicode Ohms ...
Mark J's user avatar
  • 41
2 votes
2 answers
1k views

PDF object not displaying second time in modal

I want to display a pdf in a Bootstrap modal, so in the .modal-body I added : <object width="1000" height="500" data="path/to/pdf" type="application/pdf"> ...
KenTay7's user avatar
  • 141
2 votes
5 answers
1k views

height="x%" not functioning in <embed> tag

I am using the embed tag to display a pdf file. It works perfectly, except for the fact that the "height" property won't work when I define height with % ("width" does what it's supposed to do). It ...
Oskar Våle's user avatar
2 votes
1 answer
1k views

Embed PDF file doesnt work

So I want to embed decoded pdf file in my view, but it doesnt work. I am using following code <embed src="localhost/tmp/invoices/1481634077_tmp_pdf.pdf" width="100%" height="700" type='...
JohnWayne's user avatar
  • 663
2 votes
1 answer
2k views

Dynamically set height of embedded pdf

I managed to dynamically set the height of my embed element that contains a pdf. Using jQuery to set the new height. But I don't have the feeling I have used the best 'solution'. Old height = height ...
Brieneke's user avatar
2 votes
1 answer
3k views

Does embed tag work in Vuejs template for pdfs?

I want to create an API to render a local pdf file with Vuejs. My solution was to embed it in an Html in public folder and then call that Html file from my component. (The pdf was also in public ...
fiona's user avatar
  • 31