Print a Pdf file on the Android Button Click - android

I have a pdf file in my sd card i want to print that file on the button click.
In this document it tells only how to print a custom content by rendering it on a PDF canvas and sending thus created PDF document for printing. But has no information about how to print a pdf file directly from sd card?
Please anybody has any idea how to handle this. Thanks in advance

Please go through this document which explains how to print a particular doc, image etc.
https://developer.android.com/training/printing/index.html
It even contains a link for the sample and a tutorial video to achieve the same.

Related

How to open a PDF file onclick of a button in Android?

I need to save PDF file when my app installs and then open it when a user clicks on a button. I found many solutions but was not able to integrate them into one.
Try this code, display pdf file from a file location (works from any file location, not SDcard specific)
How to open a PDF via Intent from SD card
I was doing this in work today and it is not that easy.
1) saving the file is not difficult any normal file code will work for a pdf file.
2) showing the pdf you have two options you can display a pdf in a webview if the device has internet access by displaying a Webview and loading google docs with you pdf file at the end of the url
3) or you can create an intent and see if the device has an application that will display the file, you will need to use a FileProvider to get it to run but there is a good post
https://developer.android.com/reference/android/support/v4/content/FileProvider.html

How to modify the existing PDF in Android

I already shown a PDF file in android device. But I need to scribble (writing with my finger) in that PDF page and I need to save the changes with existing PDF file itself in the sdcard. I searched so many source codes but i can't get what i am expected. Could you anyone help me on this. Thanks.

Android code using iText to edit an PDF and save it as different file name

I have an PDF file and there are certain inputs that ought to be filled in the same. There are two approaches to this. Either, I create an entirely new screen that looks like the PDF file and get the user inputs and parse it to the iText library to create a PDF file or open the template PDF and fill in the contents through the android screen and save it in different file.
I am trying to concentrate on the second option. Here, I will have to open the existing template PDF and enable the user to enter the input items. I will also have to allow the users to scribble in certain areas. Is this feasible? I have done some research and am not sure, if all these are possible using iText.
Please can someone help me?

Content viewer Android

I'm trying to create an activity to show information about the monuments. What I thought is to create HTML files and then display them with a WebView. The problem is that I also need to export these contents on sdcard in some type of readable format (preferably pdf but I read some things and it seems very difficult and then I tried several solutions without success). How can I do this? Should I start from another type of format different from HTML?
Advise me a path to follow ... I do not know what else to try.
Thanks in advance. :)
Michele
There are multiple options. I would suggest go the PDF way.
If you have control over the contents, then the best way would be to create PDFs and you can then send a intent to open the PDF. If there are multiple PDF viewers available, then the intent will give an option for the user to select the viewer. If there is only one viewer available, the PDF will be opened in the viewer. If there are no available options, you can then send them to Google Play (Android Market) to download a PDF viewer and then view the PDF.

Search Any word in pdf file

Currently i am working in pdf viewer application in android.I have one simple pdf viewer in which i can zoom-In,zoom-Out & go to next page,Now i want to add functionality to search a particular word from pdf file.any one can suggest me the good idea of it?
Thanks in Advance

Categories

Resources