

MainActivity.java package import import android.Manifest import import android.os.Bundle import import import import import import import import import import import import import import import import .BaseFont import .PdfDocument import .PdfWriter import .draw.LineSeparator import .draw.VerticalPositionMark import import import .PermissionDeniedResponse import .PermissionGrantedResponse import .PermissionRequest import .single.PermissionListener import java.io.File import java.io.FileNotFoundException import java.io.FileOutputStream import java.io.IOException import import import public class MainActivity extends AppCompatActivity Ĭomman.java package import import java.io. All Android applications are built using Java in Android Studio. Now we will design our UI part in the main activity. As the project is developing an Android Application, the default programming language is Java. In the res folder, we need to add an XML directory and after creating the XML directory create an XML file. Now we need to add uses permission and the provider in the manifest file.


implementation 'com.itextpdf:itextg:5.5.10' implementation 'com.karumi:dexter:6.2.3' Today we will learn how to create a pdf file and after creating a pdf file we will be able to print this pdf using a wifi printer.įirst of all, we need to add dependency in the build.Gradle(:app)file. Create PDF and print PDF with WIFI printer in Android Java.
