Can I force PDF documents in my web application to get opened by Adobe Acrobat plugin - pdf

Is it possible somehow to force my pdf documents to open always with the Adobe plugin for opening pdf's in a browser?
The problem is that I have some forms that have to be filled and saved(made with Adobe LiveCycle Designer) but with the Chrome PDF Viewer or others different than Adobe's it fails and the filled pdf can not be saved or saves but without the entered data.

you cannot force pdf to be viewed by acrobat by default. Default pdf applications set by browser will be there. You need to go through browsers in order to change the plugin. No code can invoke this functio

Related

open a pdf file in browser from vb

I am trying to open a pdf file from vb using:
Diagnostics.Process.Start("file:///H:/Filename.pdf")
It opens using the PDF application.
I want it to open in the default browser using the browsers pdf viewer.
Thanks

XFDF URL reference to PDF form not working

I'm populating a PDF form using XFDF. The XFDF is produced by my Java webapp. I want to reference the PDF form from XFDF using a URL because I want form templates to be stored on the server. The form is password-protected, so I can't flatten it server-side with iText.
Using a local path works fine:
<f href="C:\Users\...\MyForm.pdf"/>
but a URL fails:
<f href="http://localhost:8080/app/servlet/PdfForm?id=176"/>
From the article below it seems it's possible, but I've looked through the XFDF spec and it doesn't mention URLs, only local paths:
http://wiki.developerforce.com/page/Adobe_XFDF
Neither Acrobat Reader X nor Acrobat Pro X seem to handle it. The browser fires up but and form doesn't get merged. I've tried changing default browser from Chrome to Firefox to IE with no luck.
Does anyone know if a URL reference works?
I think the URL should be only http://xx.xxx/xxx/test.pdf, a pdf form, not a stream.
I was able to open it in Internet Explorer on a PC with Adobe Acrobat Reader DC installed, but other browsers seem to be unable to do so.
Reference: https://helpx.adobe.com/jp/acrobat/using/display-pdf-in-browser.html

How to force to show PDF in google chrome using Adobe PDF Plug-In only

I am facing a problem while showing a pdf in Google Chrome. The issue is that Chrome shows some pages of the pdf as black.
This happens when Chrome PDF Viewer is enabled. If I disable this plug-in and use Adobe PDF Plug-In it works fine.
Is there any way to show a PDF in Google Chrome using the Adobe PDF Plug-In only.
AS I am showing PDF using an HTML object tag, is there any parameter which forces Chrome to show the PDF using Adobe PDF Plug-In?
There's no way for a website to force the browser to use one renderer or another: those decisions are all made client-side. As you noted, disabling the Chrome PDF plugin bubbles the Adobe plugin to the top, but that's a decision the user would have to make.
That said, if you have a PDF with rendering issues that you can share, please file a bug at http://new.crbug.com/. I'll be happy to put it in front of the correct team for triage.
The only way that you can be 100% that all users can open your PDF correctly currently, is to force that the PDF is downloaded.
Use some headers within your apache or backend.
Example for Apache
https://stackoverflow.com/a/11991050/3086639

Cannot open dynamic PDF files in Internet Explorer

I upload & save PDF in SQL. Then people can open that PDF in web browser (IE). Today I've updated Acrobat Reader and I cannot open same PDF in web browser. I can save it to desktop then open it. There is no [Open] button in dialog box and it says file might be corrupted
Name: admin.pdf
Type: Adobe Acrobat Document, 37,8 KB
From: domain.com
*
Dynamically generated PDF' link is like below:
http://domain.com/admin.asp?cmd=Download_PDF&id=20112
I did every solutions on both Adobe & Microsoft websites. I cannot open PDF files directly in IE8.
My ex-ASP code was:
Response.ContentType = rsFile("filetype")
Response.BinaryWrite rsFile("filedata")
Then I just changed it to make PDF as downloadable file, now I can -at least- download & open it in external Acrobat Reader (dialog box shows [Open] [Download] [Cancel] buttons):
Response.Buffer = TRUE
'Response.ContentType = "application/pdf"
Response.ContentType = rsFile("filetype")
Response.AddHeader "Content-Disposition", "attachment; filename=" & filename & ".pdf"
Response.BinaryWrite rsFile("filedata")
I just stumbled upon this exact same problem today, and dug up a solution.
We also have a site that's serving up pdfs stored in an SQL database. When the aspx page tries to serve up the pdf, it displays exactly the same dialog you're describing. It only affects IE8 (no one here has any other version of IE I could test); the most recent versions of Chrome, Firefox, and Safari, all loaded the pdfs in the browser without incident.
So after I found your question, I dug around some more, and found the following:
http://forums.adobe.com/thread/792591
Starting with adobe reader 9.4.2, a bug was introduced relating to character sets, such that if the Content-Type has a charset value, adobe will end up looking for a registry key that doesn't exist.
I did what jspraul suggested in response 17, and added:
Response.Charset = null;
Like you, I had simply set my Content-Type to application/pdf, but because my Response.Charset had a value of UTF-8 by default, adobe was looking for a registry key related to UTF-8 and failing to find it. Hopefully adobe will patch this at some point, but that should fix your problem in the interim.
The reason why you the PDF is not opening in the browser is because the new installation of Adobe Reader is not registered as an IE plugin. Maybe the old plugin needs needs to be removed first.
If a particular version of Adobe Reader does not open a PDF, then it is possible that the PDF is corrupted. Ensure that your ASP code is closely packed and you do not by mistake write a space or newline to the browser. Remember to call Response.Flush at the end.
If you add the attachment header then the File save dialog will be shown and the PDF plugin will not catch the PDF inside the browser.
Your browser may also be loading a older corrupt copy of the PDF from the cache. Empty your IE cache (temporary Internet files).

Opening a local PDF file in Chrome

Ok I see these 2 questions:
How to open PDF file in Google Chrome in new tab?
Can Google Chrome open local links?
But I'm not sure they answer my question. I'm trying not to install any PDF reader (Adobe sucks) and know that Chrome will open PDFs I open from the internet. So my question, is why won't it work if the PDF is local to my machine? Is there a workaround/plugin/other browser I can use to accomplish this?
The argument of security is totally bogus; how would a PDF I'm opening on the internet be any more secure/safe than a PDF I have on my local machine?
I'm running Chrome 8.0.552.18 on my computer now, under Windows 7, and I just clicked and dragged a PDF onto it, and it loaded it up no problem...
And no, it doesn't look like it's using Acrobat or Foxit, or another PDF reader... it looks like Chrome 8 does have its own PDF renderer.
I'm assuming you are on Windows. So, if your PDF is c:\some\path\some.pdf, simply use this URI in Chrome's address and search field:
file:///C:/some/path/some.pdf
On Linux I'd expect this for /some/path/some.pdf to change to
file:///some/path/some.pdf
(but have no chance to test this).
When you say "open a PDF in Chrome", what do you mean, exactly? Are you opening it through Gmail or Google Docs? If so, that's Google doing conversion behind the scenes, converting it to HTML on their servers, with Chrome simply rendering the HTML as usual.
As far as I'm aware, Chrome has no built-in PDF viewing capabilities.
edit looks like Chrome 8 does have its own PDF viewer built-in. Wowj.