For weeks I have been using:
pdfParam = "search="" + searchString + ""&toolbar=0&messages=0&navpanes=0&view=Fit";
url = url + "#" + Server.UrlPathEncode( pdfParam );
if ( openType == "OpenOnPage" )
var x = GetPDF( GetPDFDiv() );
x.Text = "<object " +
"class=\"Object\" " +
"width=\"100%\" " +
"height=\"980x\" " +
"type=\"application/x-pdf\" " +
"data=\"" + url + "\" " +
"> " + "
This browser does not support embedded PDFs. Click here to view it. couldn't figure out to put html text in here
Today, the PDF showed for a moment, and then an error from PDF said the "Adobe PDF Reader DC stopped working". I was able to remove the pdfParams and then it showed ok, but the main thing I was trying to accomplish was search for a string so that the pdf was positioned to it.
So then I uninstalled the Reader and downloaded and installed the latest one. Now I get the "This browser doesn't support..." message and it doesn't show in the page at all. If I switch it to using an iframe, it shows, but I don't know how to use the parameters with an iframe.
This is on
Windows 10 - Creators Update
IE 11.0.15063.0 update versions 11.40
Adobe Acrobat Reader DC 17.009.20044
Embedding a pdf on-page is a bad idea these days. Many (going on most) browsers do not even use the Adobe Reader plug-in any more. They use their own viewer. Your success may vary from one person and pdf to the other.
I'm aware of all that. It wasn't my choice to do it. It is my job to make it work. Which is why I asked the question.
It is my job to make it work.
Understood. Unfortunately, this is probably going to be more work than you expect. It is not a Reader issue, it is an individual web browser issue and will have to be taken up with support for each browser. They don't use Adobe Reader to open or preview pdf files so you have to find out how to make it work with their viewers.
I only have to make it work with IE. I already asked on the IE forum and they said to come here.
I have some more information. When I run under Visual Studio debugger that uses IIS Express, the <object> tag isn't recognized and the paragraph with link is shown. However, when I run it from a server, even with the exact same code, it shows the PDF, but still blows up.
So I think there are two problems. One is probably IIS Express related. I'll look into that this morning. The other is Reader related. I'm guessing that the Reader no longer accepts the search parameters. Do you know if that is correct?
We're seeing the same issue here with our application that uses a frameset to embed a pdf document. If I remove the #Search parameter it works fine. Note that Page still works in the embedded case so only Search (that I've tested) seems to be broken.
The ChangeLog for this version doesn't have any information if this change is intentional. I assume it isn't since it results in a crash instead of just ignoring the parameter.
Anyone see any responses from Adobe on this?
I've spent a day so far just trying to get my embedded pdf to work AT ALL. I've been reading on the web, but I have no idea why it stopped working (and yet does work from REAL IIS rather than IIS Express in Visual Studio.
Best I've been able to determine this started with the version of Acrobat Reader DC that was pushed out April 11, 2017. Manually reverting to Reader XI allows it to work again (not, of course, a viable long-term solution).
My application was working fine until the update happened. Not sure why yours doesn't work at all but ours works without #Search= on the file name. The user then has to manually open Adobe's search tool to find the search terms.
Ok, I finally figured out how this broke. At some point, I added my localhost to Compatibility view to solve some problem. That worked fine for that problem, but meant the browser was running in IE 5 mode. Apparently IE 5 didn't like the <object> tag.
I finally spotted it when running under F12 debugger. I suddenly noticed a "5" up in the upper right hand corner. When I popped the list, I saw all the versions from 11 down to 5 as selections. I select 11 and then my page worked. Then I left the debugger, ran it again a little later and it was broken again. The reason being that my localhost was still in the Compatibility view of IE5.
So I removed localhost from the Compatibility view and now I'm back to a working application again.
Still have the question of how to get rid of the Search window when there are search parameters and I THINK the PDF Reader will still blow up with the search parameters there. More fun to be had....
You can force a page to use the most recent HTML that IE supports by adding the tag:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
into the head area of the page. I'm still using frameset for us, I tried using an object embed but I see the same results.