https://kotlinlang.org logo
Title
u

user

06/20/2022, 8:31 PM
How to save string to pdf? Do you know how to save string to pdf. I use this code and it doesn't work or it saves somewhere else. fun stringToPdf(data: String) { // val extstoragedir = Environment.getExternalStorageDirectory().toString(); val path = applicationContext.filesDir.absolutePath val extstoragedir = path val fol = File(extstoragedir, "sample.pdf"); val folder = File(fol, "pdf"); if (!folder.exists()) { val bool = folder.mkdir(); } //...