Android Question Convert Pdf to JPG

luciano deri

Active Member
Licensed User
Longtime User
Hello, How is possible convert a Pdf file in a image file such as jpg or other format?
 

DonManfred

Expert
Licensed User
Longtime User
There is no Library for this. A PDF is a specific format.
 
Upvote 0

luciano deri

Active Member
Licensed User
Longtime User
in google play there are a lot of app that do this very well. Why there developers can make this function and we can not with b4x?
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Why there developers can make this function and we can not with b4x?

C'mon. Of course you can do it with B4x but so far nobody did the job for you :D One way is to display the pdf in a view and get a snapshot (hardcopy) of it. Take a search for snapshot and display pdf or similar.
 
Upvote 0

wonder

Expert
Licensed User
Longtime User
Upvote 0

luciano deri

Active Member
Licensed User
Longtime User
Can i kept
<uses-sdk android:minSdkVersion="19" on manifest and test phone.sdkversion in souce code before take Pdf to Img conversion?
 
Upvote 0

luciano deri

Active Member
Licensed User
Longtime User
ok, With this code a i have a img but how can save it in a file?
B4X:
 Sub ConvertiPdfImg(nomefile As String)
     Dim Render As PDFRenderer
    Dim img As Bitmap
     Render.Initialize("",Main.pthDOC,nomefile)
     For i = 1 To Render.PageCount
        img = Render.renderPageforDisplay(i)
' now save img in a file
     Next
    

End Sub
 
Upvote 0
Top