iOS Question Draw a label using cvs.DrawView....Question

kisoft

Well-Known Member
Licensed User
Longtime User
I create a PDF document using a label
B4X:
    Dim cvs As Canvas
'    cvs.InitializePDF(File.DirDocuments, "1.pdf", 612, 792)
    cvs.InitializePDF(File.DirDocuments, "1.pdf", 595, 842) ' size format A4
    cvs.DrawColor(Colors.White)
    Dim lbl As Label
    lbl.Initialize("")
    lbl.SetLayoutAnimated(0, 1, 0, 0, 595, 842)
    lbl.Multiline = True
    lbl.TextColor = Colors.Black
    lbl.Font=Font.CreateNew(10)
    lbl.Text = "text"
 
    Dim r As Rect
    r.Initialize(30,0,565,820)
    cvs.DrawView(lbl, r)
    cvs.Release
    WKWebView1.LoadUrl("file://" & File.Combine(File.DirDocuments, "1.pdf"))
    Dim avc As ActivityViewController
    avc.Initialize("avc", Array(CreateFileUrl(File.DirDocuments, "1.pdf")))
    avc.Show(pg4, pg4.RootPanel)
The problem is that only one page of the document is created and the text that does not fit on the page is cut off. Is it possible to create a multi-page document to fit the entire text. Do I have to divide the text into parts?, and use Canvas.NextPDFPage ...
 
Last edited:
Top