Sub WobbleMenu1_Tab4Click
svList.Height=200%y
Pannello.Height=200%y
Dim filename As String="scheda.pdf"
WobbleMenu1.SetVisible(False,False)
Dim pdf As PdfDocument
pdf.Initialize
pdf.StartPage(595, 842) 'A4 size
Dim bmp As B4XBitmap = Pannello.Snapshot
Dim dest As Rect
dest.Initialize(10, 10, 0, 0)
dest.Width = bmp.Width / bmp.Scale
dest.Height = bmp.Height / bmp.Scale
pdf.Canvas.DrawBitmap(bmp, Null, dest)
pdf.FinishPage
Dim out As OutputStream = File.OpenOutput(provider.SharedFolder, filename, False)
pdf.WriteToStream(out)
out.Close
pdf.Close
svList.Height = 65%y
Pannello.Height=100%y
Dim in As Intent
in.Initialize(in.ACTION_VIEW, "")
provider.SetFileUriAsIntentData(in, filename)
in.SetType("application/pdf")
StartActivity(in)
WobbleMenu1.SetVisible(True,True)
End Sub