Is there a free way to view postscript files on android? I cannot find a solution online but surely lots of people must want to do this.
Recently Sam Buss and I realized that you can upload the PS file to Google Drive and once its uploaded to your drive, the drive viewer will open and render the PS file on your android device.
Here is a way that just worked for me on a Samsung Galaxy 5. Something similar can probably work for others. The general idea is to download the postscript file, and use an online web service to convert it to PDF, which you can then view.
Download the postscript file.
Open your browser (I use Chrome). Navigate to www.ps2pdf.com. Navigate your way to their "Convert" page, click the "Choose file" botton. Select "Documents" when it asks for "Choose an action". Go into your "Downloads" folder on your phone. Select the downloaded postscript file. Then, back on the ps2.pdf.com page, click the Convert button.
Click the active link for the converted PDF file. This opened in Adobe Reader, which is my default PDF viewer). If I want to access the file from other programs, it is in Adobe Reader's "Recent" folder in my phone's documents.
Related
I'd like to generate a signed link via S3 and then allow a mobile user to download this file. So far this is going okay (downloads with the correct name, filesize, etc).
However - when it comes to opening it (even a .png), I get the message "Cannot open file" and it doesn't turn up in the device's photos, gallery, or anything like that.
Are there some kind of headers missing? Some extra bit of set-up?
The context is a React Native app where the user requests a file, opens the URL via Linking in Chrome, Chrome downloads it, and then they can open it properly. Ideally this will work for any file types (e.g. png, jpg, docx, pdf). Thanks!
If you can't do this in ReactNative, you can always leverage on a native picker. https://developer.android.com/guide/topics/providers/document-provider in any case, there are tons of information to open files in ReactNative with some extensions as: https://github.com/huangzuizui/react-native-file-opener. I tried a couple of them and they work. It should do the job, check the permissions in your application as well. It can be a headers problem so you need to check all of this.
On Android (8.0), I'm trying to create a local html file that includes links to some local files that can't be viewed directly by Chrome, like <a href="relative_path_to_file/file.docx">. In a normal web browser (i.e. on a PC), I can click the link and it will open the file in its default viewer. On Android, if I open one of the local html files in Chrome and click one of those links, it directs me to content://nextapp.fx.FileProvider/path_to_file/file.docx, showing "Your file was not found." I do have an appropriate app installed to view the file (I can open it via a file explorer app). I would like to understand how I can structure the URLs such that docs of various types (i.e. docx, xlsx, pdf, etc) can be accessed via the links that refer to them - clicking the link should offer to open the file, as it does when accessing the file from a file manager.
I tried rewriting the links to an absolute path, i.e. "/storage/emulated/0/path/file.docx." The result is the same.
I tried rewriting the links to "file:///storage/emulated/0/path/file.docx." Chrome just redirects to about:blank.
I tried opening the html doc with "HTML Viewer" rather than Chrome. The behavior is more or less the same (in the first case it redirects to about:blank, in the second it says "No app available to open link.")
How can I structure the link so it can be clicked & open the referred-to file in appropriate viewer?
Finally figured it out. A working link to open the local file in its default viewer looks like:
"intent:///abs/path/to/file.docx#Intent;scheme=file;action=android.intent.action.VIEW;end;"
...With one important caveat: it breaks if there are any "dots" in the path (i.e. I had the files in a .hiddenFolder, which apparently causes Chrome to be unable to figure out the intent link).
Reference: https://developer.chrome.com/multidevice/android/intents
I'm trying to get my app to open another app, a file manager, to select a file and return it's path to my app. For example if I were to go to my phone's web broswer and attempt to upload something to the web, it'd ask what app I want to use to select the file. Choosing the file manager I would then search for the file, select it and then send it back to the web browser for the upload. How would I do this in my app, I've looked at https://developer.android.com/training/basics/intents/sending.html but it hasn't helped me.
I'm developing an application to read PDF Files.
So, that my application itself has to read pdf Files. so which library is the best to show pdf files.
I have read a dozen of related articles but I couldn't get the idea.
There is a button on the front page, by clicking that button user gets access to sdcard. all the folders are under his fingers. on opening folders if user open .pdf file , it will open other wise a toast is shown, "this is not a pdf file".
It is hard to find a free and stable library. If you are opting for free try APV PDF Viewer
Make sure you read the license if you are planning of use it.
In one of my applications where I had to display pdf files inside the app, I used radaee pdf viewer. Easy to use, deals with fonts, and maybe stable.Problem is, it is not free. You can try it for free, but you will have a water mark in every page.
Hope this helps. Pdf in android app is not a walk in the park. I think that is the main reason that there are not tons of pdf viewers in google play. Good luck.
In my web site i make link likeDOWNLOAD. And when i open this site on my Android phone and click on link, standart browser opens txt file. I want to download file and not open.
What i may to do for that?
Thanks!
I think you need to set MIME type set on your server setting.
By default, the text.txt is linked with a viewer hence if will download and open.
Secondly, it would be stored in downloads folder on your sdcard.