How to convert image(jpg) to pdf?

Hello , I need to know how to convert the multiple image into a PDF ?

I have seen the Guides for Android PDF Library and set up like what it said, but when I set up to this part
I can’t understand how to use this part.

Also I have seen the sample code too , but still can’t figure it out.

I am using Android Studio with kotlin, and I hope you can help me out. Thanks.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:



To convert multiple images to a single PDF, you can use the Convert.toPdf API as mentioned here: .

For example:

// Converts multiple images into one PDF document
private fun convertImagesToPDF(images: List<File>, outputPath: String) {
    val doc = PDFDoc()
    images.forEach {
        // Convert image to a PDF page and adds it to the doc
        Convert.toPdf(doc, it.absolutePath)
    }, SDFDoc.SaveMode.INCREMENTAL, null)

Thanks for reply.
I will try this out right now , thank you very much.