How to convert Image to PDF?
I would suggest you to use iText pdf library. Here is the gradle dependency: implementation ‘com.itextpdf:itextg:5.5.10’ Document document = new Document(); String directoryPath = android.os.Environment.getExternalStorageDirectory().toString(); PdfWriter.getInstance(document, new FileOutputStream(directoryPath + “/example.pdf”)); // Change pdf’s name. document.open(); Image image = Image.getInstance(directoryPath + “https://stackoverflow.com/” + “example.jpg”); // Change image’s name and extension. float scaler = ((document.getPageSize().getWidth() – document.leftMargin() … Read more