Hi, I have this code on a page that displays a pdf file uploaded on the internal folder File.DirDocuments,
this code is activated when the page opens, the first time the pdf is seen very well, but subsequently
it is seen small and on one side of the screen, if I close the app and reopen it is always seen well only the first time
B4X:
private Sub B4XPage_Appear
showpdf
End Sub
Private Sub showpdf
WebView1.Initialize("WebView1")
Root.AddView(WebView1, 0, 32, 100%x, 100%y)
B4XPages.SetTitle(Me,"File .....")
If File.Exists(File.DirDocuments, "File name.pdf") Then
WebView1.LoadUrl(xui.FileUri(File.DirDocuments, "File name.pdf"))
Else
hd.ToastMessageShow("File non trovato",False)
End If
End Sub
What should I do to make sure that the pdf always looks good, on android I don't have this problem
Maybe I should close the page once I exit but I don't know how to intercept the closing of the page
Sub OpenPDF(dirFile As String, nameFile As String) Try #If B4A ' Platform: Android Dim provider As FileProvider provider.Initialize ' Copy the file to the shared directory Wait For (File.CopyAsync(dirFile, nameFile...
Sub OpenPDF(dirFile As String, nameFile As String) Try #If B4A ' Platform: Android Dim provider As FileProvider provider.Initialize ' Copy the file to the shared directory Wait For (File.CopyAsync(dirFile, nameFile...