Does android have a simple way to print a PDF document? - android

I know android has http://developer.android.com/training/printing/custom-docs.html and http://developer.android.com/reference/android/graphics/pdf/PdfDocument.html but I'm wondering if anyone has found an easier way to print a PDF document. My app has PDF documents readily available but no easy access to the page count. Android OS requests pages to be printed from your PDF document. Has anyone found a succinct way to just hand Android OS their PDF document for printing?

Related

Opening docx and pdf documents in react native

Faced a number of problems opening documents in a mobile application. We have 2 types of PDF and DOCX documents available.
There are no packages to open Docx for react native.
In order to open a pdf, you need to have the base64 of that document. The back-end does not give back, and in order for the mobile application to create it itself, you need to fasten a heavy package.
Two types of documents can be opened in webview, but only viewing without saving will be available there, and then, this will only work on ios, android immediately starts downloading documents without viewing.
You can use the google.docs service to view documents, but you won't be able to open the document without cookies. Our back-end doesn't let the google.docs robot (for obvious reasons) download the document and display it to us.

Why do links to PDF documents now require https to work on Android phones?

We have a file server on which we place PDF documents and then embed links to them in a smart device app. Up until recently, using links to the PDF documents starting with http:// worked fine for Android and iPhone users. All could load the PDF file just fine. Then a few months back (approximately) Android phone users started reporting they would get an error when trying to load any PDF. Yet iPhone users had no issues loading the same PDF document. It was verified that these PDF documents (several) were not corrupted and opened fine when placed on another file server.
I have an iPhone so I can't give you the exact error msg received by Android users but to reproduce it, it was along the lines of... click the link to the PDF, a button appears showing View PDF, click that button and several apps appear to choose the app to open the PDF with, click one (like Adobe Reader, or Google Drive) and an error appears stating the file could not be opened and may be corrupted of the wrong syntax.
Tonight I found the solution.
The url to the PDF on all these documents on our server had been like http://...
but when I changed it to https://... it works fine.
I can't find ANYWHERE any mention of a change by Google that this is now a requirement.
My question...
Can someone explain and/or point me to a reference that explains why https must be used in embedded links to PDF documents? It seems like a pretty big deal to make this a requirement and not tell anyone. My searching the internet has so far not turned up anything.

How to open documents located in Local Storage in android using WebView?

I have a doc/ppt/xls file located in my sd card. I want to open it without any third party app (i.e within my app itself) using webview. Though I am able to open documents by embedding it in google docs url like -
http://docs.google.com/gview?embedded=true&url=[filelinkHere]
But how to open a file located in internal or external storage in webview ?
Also, Suggest me any third party ALL-IN-ONE library for android to view all types of documents. I have tried ASPOS but it has few unresolved bugs and APACHE-POI is difficult to use.
I had the same issue few days ago .
i found Android PdfViewer best to view PDF files and Android PdfMyXml best to create pdf files in android.
For working with Word and Excel as a most reliable answer I suggest you to take a look at OliveDocLibrary .
If your documents are in cloud so there is an alternative way to display docx,pptx,pdf and such formats with a combination of Webview and googleDoc.
You might find other possible solutions in server-side machines or maybe a creative way!
Hope it help
You can integrate some library project to your project with which you can open the pdf file inside your app.
Reference :
https://github.com/tekinarslan/AndroidPdfViewer
https://github.com/JoanZapata/android-pdfview

Opening and reading pdf file from devices internal storage android

I have no idea where to start, and can't find a decent, or at least understandable tutorial how to do it. Im still new to android (and coding in any matter) but i need to create and app that opens a pdf file (CV in my case) and reads phone number and email from it. Any ideas (tutorial links) how to do it? :)
You could use iText library: http://itextpdf.com/
In FAQ, there's a question: "Can I extract/parse information from pdf ?"
http://support.itextpdf.com/node/27

Open attachements in PDF from mobile

I created a PDF with some files attached and links (in fact annotations) to these files:
When I open the PDF from my computer with Acrobat Reader I'm able to open all files either by clicking directly on the "Attachments" column or clicking on the links (annotations).
But when I try to do the same on mobile (iOS, Android or WP) via Acrobat Reader application (I also tried with Foxit App and few others) it doesn't work:
I can't access to the attachments column
When I clicked on the links (annotations) nothing happen
So, I want to know if someone know a mobile application (no matter of the OS) that is able to open/access to the attachments in a PDF ?
Thank you.
Gerald.
File attachments and other annotations are beyond the scope of most (if not any) mobile PDF viewer. You might have to look around to find a viewer which offers to support these objects; maybe you are lucky.
PDF viewers for mobile devices do evolve quite rapidly, so, things may change within the next few months…

Categories

Resources