Tuesday, November 12, 2013

How to Generate PDF in Android

Hi Friends !
Today I am going to share How to Generate PDF in Android tutorial. This tutorial will help you generate your own PDF file in Android. Sometimes, you need to create certain applications where in you want to output the details in the form of a PDF file so that it could printed or used in some other way.

In order to generate PDF we are going to use an external library called Droidtext which is used for PDF creation. It comes with a desktop version and an Android version, the differences between the two can be found over here. For this tutorial, I will be using the Android version.
Add Droidtext .jar file to Android project inside the libs folder and make a java build path.


activity_main.xml


 

MainActivity.java


 

Menifest.xml


 

Output ScreenShot-

 

 

 

 

3 comments:

Mastering Jetpack Compose: Key Methods for Efficient Android UI Development

Jetpack Compose is a modern toolkit for building native Android UI. It simplifies UI development by providing a declarative approach, making...