PDF loads on computer but downloads on mobile - pdf

I have my resume hosted on resume.momohossa.in
My issue is that when I try to reach this site on my computer, it just opens in a new page. However, when I try to open it on my phone, it has to download the file. Then, I have to open the downloaded file on a PDF viewer such as adobe. I would like for it to not immediately download on my phone. Does anyone have any advice?
Thank you in advance!

By default, on iOS devices, its safari browser can view PDF file directly, and for android deveices, its chrome browser also can do that.
make sure you pdf file is not a stream output file. just make it a static file, e.g. http://host/target.pdf not http://host/pdf/target

Related

WebDav Pdf Saving error

I have set up a webdav folder that I can access thorugh chrome and edit files and save them back to the server, for example, I can open a word doc, edit it and save it back.
When I come to open a pdf, it wont save back to the server and downloads a copy of the pdf instead of the original.
Is there a way of enabling this to edit a pdf?
My end goal is to be able to open a pdf, add comments/highlights and save it back to the server, through my browser.
Thank you
Edit:
I have set this up through Apache 2.4, no plug ins through chrome, I have mapped a network drive to the server folder where I can open and edit files. Except PDFs, I would like to add comments to a off but when I open one the option is greyed out and when I try and save it after opening it tries to save to my desktop.
I'm not sure i've got your use case right, but if i've understood you correctly you have a link in a web page to a PDF which you're viewing in chrome. You click on that link and the PDF downloads to a temp file from which it is opened. If you edit and save those changes are simply saved to the temp file on your local PC. Is that correct?
If so, then this is simply normal behaviour for links in web pages. There is absolutely nothing in the HTML standard which suggests links should be opened by an editor with knowledge of the source location.
What you really want is for the link to launch an editor program which retrieves the remote document in edit mode (probably locking the remote resource) and then have edits saved back to the server. For this to happen there generally needs to be some special interaction in the browser. In Internet Explorer this is provided by the sharepoint dll and special script code. I think there's a plugin for Chrome which does the same thing, although differently.
I havent used the Chrome plugin, but i think this might help - https://code.google.com/p/npapi-msdocs/

how to implement pdf.js to view pdf files in the pdf viewer?

i want to open pdf files that are linked to in a document in a new page in the pdf.js viewer.
i have downloaded the zip file from github:
https://github.com/mozilla/pdf.js
and gone to both of the index.html files in the examples folder.
i get blank pages when opening either of these files.
can anyone please tell me how to implement pdf.js so that i can open pdf documents in a new page in the pdf viewer?
thank you.
Try using '?file=url' in query-string with viewer.html.
For example: www.example.com/pdf-js/web/viewer.html?File="URL"
Source: pdf-js on github
And yes, you will most definitely have cross-domain issues if not using any web-server, as mentioned by #Silent.
Cheers.
Let me guess that you tried to directly open the examples via chrome. Your url probably starts off with file:///. This is causing a cross origin request error to occur on your browser. To properly view the examples, you need a LAMP stack.

download pdf file in blackberry in my applicaiton?

I am working on a sample BB application for downloading task.
I have internet connection setting in my app. Now my task "on click of a button, i want to download a PDF file in my device as a normal file download from a link"
I have searched alot regarding this query but didn't get anything.
As the code very long to provide here, please take a look at this url and invoke the blackberry browser with your pdf url.

How to show pdf in blackberry?

i have to show pdf file in the blackberry by first downloading it from the server. is there any default feature that blackberry provides to show the pdf in blackberry app?
all suggestions will be appreciated...thanx
As far as I know there is no default viewer on the BB to show local PDF files (outside the attachments). You will have to use a third party tool (or write your own viewer)... See this thread for more info.
One interesting option you can use is have the pdf in a browser accessible location and pass in code the url of the file to the browser - this should open the file using the BB compressed view (the attachments viewer), though it might only be available with BES/BIS, not sure.

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.