i have a simple web page with a list of links linking to specific pages in a PDF file. This works fine in Firefox, IE 6,7,8,9 but not in chrome?
The code is very simple and works in everything else. In chrome however it just opens the PDf on the first page.
Help please!
Adobe Reader supports #page=X as a postfix to the URL in order to jump to a specific page in a PDF document. Chrome's PDF reader doesn't support this at the moment.
This is a known bug that has been filed as http://crbug.com/65851; please star that bug in order to follow the progress.
Related
I just created this site and because I am using a Mac, I do not have IE. I have had a few people tell me that they are not able to download PDF files. That is to say, when they click on a link that is supposed to display a PDF file in a new tab, they get a "This page can not be displayed" error. I can take the same file and put it on a different website, create a link and it works fine in IE.
The link to this page is www.dallascameraclub.org. Try clicking on any Newsletter as they are all PDF's. They will produce an error in IE. Works fine in Safari, Firefox, and Chrome.
This is a wordpress site and I have never heard nor had this problem before. I have no idea why this would be the case.
Research seems to always blame IE for something or another but there are several people complaining of this when this issue never happened on the older site. Same links, same PDF's and other document types. I am a bit perplexed.
Any ideas?
Many thanks,
Houston
I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.
Here's the form in question
The "Email" button in the top right is just a mailto link, and it doesn't work in chrome's pdf reader. Any idea what's happening? It works just fine in acrobat.
It's unfortunately a limitation of the built-in PDF viewers in Chrome and Firefox. If you want the file to open in Acrobat, you have to force the browser to download the file rather than open it. You can do this in modern browsers using the HTML5 download attribute:
Download Form
This link has more details: http://davidwalsh.name/download-attribute
For a more widely compatible solution, you would have to use the Content-disposition header. It's possible to do this with PHP, there is an example here: How to force PDF to download beginner
It is simply a limitation of Chrome's PDF reader, possibly because of security reasons. The mailto link launches the installed email application and Chrome probably wants to avoid some problems.
I know this is an old thread, but it may help someone to keep in mind that mailto doesn't work in Chrome's PDF viewer (and in Adobe Acrobat Reader as well) if it has line break in it. Hyperlink has to be in one line!
I am trying to open a pdf from my JQM webapp. I have tried iframes/embed/object, and none of those work on an iphone like they do on a desktop browser (scrolling, zooming, etc). I have settled with simply opening the pdf via a link Link. This works fine in the standard browser because the user can simply use the browser back button to navigate back to my app.
The issue that I am having, is that when a user saves the page to thier home screen and opens it using the chromeless safari browser, they no longer have the browser back button. I have tried adding target="_blank" to the link, but apparently JQM hijacks the link and prevents opening in a new page, and I have been unable to get the hacks to work.
I have also tried pdf.js, but I can't seem to even get that to work as my javascript knowledge is fairly limited, and the examples are pretty advanced. The only tutorial that I found used an old version which I couldn't get to work.
Are there any ways to bypass the JQM in openning a link in a new window (which would in turn open in the mobile safari rather than my chromeless web app), or are there any other suggestions for how to open a pdf from a webapp?
Just disable the default jQuery Mobile behaviour, by specifying data-ajax=false.
For example:
Link
See http://jquerymobile.com/demos/1.2.0/docs/pages/page-links.html
For my webApps I used https://docs.google.com/viewer to embed the pdf into my interface.
So, when I navigate the webApp by home screen icon, the app doesn't close when I open the pdf.
I met the same question: open pdf in webapp with html5.
I've tried several solutions: iframe、embed、pdf.js, but none of them is the best solution.
tips: iOS 9.x upper, open pdf with iframe only show the first page of the pdf file, and there will be a <img /> tag in the iframe body when you debug.
util now I still have this troublesome problem, anyone has solution please write your experience here.
Thank you.
I'm outputting a pdf which has been made with scribus, and in all browsers except for chrome it outputs fine, however with chrome the letters are cut off and lower than usual. I found that disabling the chrome pdf viewer fixes the issue locally. But what about users who do not have it disabled? Is there some way I can make adobe reader show it instead of the chrome pdf viewer in my code?
Any help is appreciated,
Thanks
Edit: I can't make the user download the pdf as it is somewhat a preview before they send it in.
One option would be to use a Content-Disposition header to force the PDF to download as an attachment. When the user clicked on the downloaded file, it would then open in their registered PDF viewer rather than in Chrome.
I ended up flattening the pdf using the flatten option, it unified the result accross all browsers.