iOS Tutorial Reading and Writing PDF Documents

drponciano

Member
Licensed User
Longtime User
Kind of embarrassed for this question but, how could I zoom in and out the pdf file read in example?
 

drponciano

Member
Licensed User
Longtime User
Thanks Erel. Now, with webview I cannot see the page. A very, very simple example of pdf webview is available?

Just Sorry for my lack of knowledge but...I'm learning. ha ha ha
 
Last edited:

Descartex

Well-Known Member
Licensed User
Longtime User
Has someone an example of how to create a pdf file from a layout??
I'm becoming mad without success...
Thank you in advance.
 

Descartex

Well-Known Member
Licensed User
Longtime User
After 3 hours working on it, finally i got it.
I share my solution if someone find it helpful.
B4X:
Dim PDFPanel As Panel
PDFPanel.Initialize("PDFPanel")
PDFPanel.Width=612dip
PDFPanel.Height=792dip
PDFPanel.LoadLayout("PDFLayout")
Dim PDFCanvas As Canvas
PDFCanvas.InitializePDF(File.DirDocuments,"test.pdf",612,792)
For Each v As View In PDFPanel.GetAllViewsRecursive
    Dim Rect As Rect
    Select True
        Case v Is ImageView
            Dim iv As ImageView
            iv=v
            iv.ContentMode=iv.MODE_FIT
            Rect.Initialize(iv.Left,iv.Top,iv.Left+315,iv.Top+75) 'The size i need
            PDFCanvas.DrawView(iv,Rect)
        Case v Is Label
            Dim lab As Label
            lab=v
            Rect.Initialize(lab.Left,lab.Top,lab.Left+lab.Width,lab.Top+lab.Height)
            PDFCanvas.DrawView(lab,Rect)
            Log(lab.Text&"-"&lab.Top&"-"&lab.Left)
    End Select
Next
PDFCanvas.Release

Thank you anyway.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…