Hi I'm trying to select a pdf file in the device with the Chooser as it happens with the images, but without success. My intent is to select a pdf through my app and then save it in the db of the app. I'm using SqlLite for the db. I'm using the chooser specifying the type of file to be selected but the pdfs on the device are not selectable, maybe you miss the file type header? And I was wondering if you need to use the BLOB to save it in the db? Thanks to the availability.
B4X:
Sub Process_Globals
Dim Chooser As ContentChooser
Dim pdf As PDFRenderer
End Sub
Sub ImageViewAggPDF_Click
Chooser.Initialize("chooser")
Chooser.Show("pdf/*","Select an Pdf")
ToastMessageShow("Select PDF",True)
End Sub
Sub chooser_Result ( Success As Boolean, Dir As String, FileName As String)
If Success Then
pdf.Initialize(File.DirRootExternal,Dir,FileName)
ImageViewResult.Bitmap=pdf.renderPageforDisplay(1)
Else
ToastMessageShow("No PDF SELECT",True)
End If
End Sub
Last edited: