On my site, I'm displaying several different types of files in the browser, like images, text files, etc. One of the files I want to display is a Visio document.
To display it on a page, I'm creating an iframe with the source set to the url of the .vsd file. This works fine in IE, but not in any other browser. IE will display the file, but the other browsers just open the download dialog to save the file.
Is there a way to embed a .vsd file in other browsers?
Related
Actually the issue is only with the PDF files in my asp.net application, is not opening (or) showing print print preview.
I click on a specific PDF Document and then click the print button. The browser loads for a second or two but then nothing happens. No document opens, nothing is printed, where as Microsoft Office documents (Word, Excel) will open up when I click the printer icon, which is normal. Documents with extension .txt and .jpg also behave normally. However there is a definite problem with PDFs.
On my machine (Windows 10) I tested IE 11 and Chrome and had these same exact issues on both browsers.
again i tested this on another machine (Windows 7 and IE 9) and experienced NONE of these issues. Everything worked as expected.
Have you correctly set the content type header to be
"Content-type:application/pdf"
and the content disposition header to be?
"Content-Disposition:attachment;filename='somefile.pdf'"
If you using some library for displaying pdf files - you need to reinstall it. Also such problem can be from ad blocker, try to disable it.
I am using http://pdfobject.com/ to embed PDF files inside a div. Users use several buttons to save metadata in a database for the PDF file. Every time users click on a button the PDF file is retrieved from the server which makes the system slow.
Is there a way to cache the PDF so that it loads only once. There are many PDF files which has different URL's so the best way is cache PDF files based on their URL. How can I cache PDF files in browser based on their URL?
How can i make an rtf file and tiff file format to be viewed inline in the webbrowser control of c# win forms?
Whenever i give the path to navigate as the Location of the file it works fine for JPG , PDF but for tiff and docx and rtf a new dialog box appears asking the user to either save it or view it using word. I want those files to be viewed inline with the webbrowser control.
Please anyone??
The web browser cannot natively display TIFFs and Office documents. You could upload the file to some service like Google docs, Office live or some 3rd party web service that is capable of rendering documents to HTML.
The other option is to convert the TIFF to JPEG or PNG file, build the HTML with an img tag and display it in your webbrowser control. For Word documents you can automate Word to save the file as HTML and then display it in the webbrowser control.
I want to display Pdf file inside iframe control.I have added my code like this below.
in asp page,
<iframe width=500 height=500 runat="server" id="myPDF" src="pdf_003.pdf"></iframe>
in page_load
myPDF.Attributes.Add("src", "pdf_003.pdf");
When i run the project, then the pdf file is not visible inside the iframe.Instead of this, it shown the save as dialog box for save to disk or open in pdf reader.
it is correctly shown in internet explorer but not any other browser...
How do i view the pdf file inside iframe control in all other browser?
Please Guide me to get out of this issue?
You need to change Acrobat Reader's settings so it will display PDF files on the browser itself.
See this Adobe KB article
How do I open a PDF file List in dialog box in a new Window in an ASP.NET application ?
I want list of pdf file which is stored in folder in my application and then select any of pdf and save in logged user's particular folder.
Since you want to display a list of pdf files stored in a folder on the server side you will need to render the list to a page in some format that makes sense. You may open that up as a dialog (perhaps using something like jquery ui) but it wouldn't be necessary.
Next to each file you could have a button that indicates the action you are after, say 'Copy'.
This would then send the id/name of the relevant file to the server and the server code could copy the file to some other location on the server that you refer to as the users folder.
However, if you want to download the file to the user's machine that is something else and you will find many answer here on SO about that.