Android Question Adding image to PDF

Setlodi

Member
Hi all

I hope you can assist me. I'm creating a PDF document that includes a signature image, using the cPDF class. https://www.b4x.com/android/forum/t...b4x-cross-platform-class-100-b4x-code.145181/

In the PDF preview, I can see the text but not the image.

Adding signature:
    Try
        pdf.outImage(File.DirInternal, "driver_sign.png",10,20,0,0)
    Catch   
        Log(LastException.Message)
    End Try   
    
    pdf.outText(10,10,"Driver's signature above")

Listing the files in DirInternal:

Filelist in DirInternal:
Log("Listing files")
    Dim Filelist As List
    Filelist.Initialize
    Filelist.Add(File.ListFiles(File.DirInternal))
    Log(Filelist)
    
    Log("Size of file = " & File.Size(File.DirInternal, "driver_sign.png"))

(ArrayList) [[shared, db.db, virtual_assets, driver_sign.png, db.db-shm, db.db-wal]]
Size of file = 41108

So the file exists and it is not empty. So why is the image not appearing in my PDF?



I tried to save PDf as CompressedAlways and CompressedNever with no luck...
 

Setlodi

Member
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…