iOS Tutorial Reading and Writing PDF Documents

Discussion in 'iOS Tutorials' started by Erel, Dec 17, 2014.

  1. Erel

    Erel Administrator Staff Member Licensed User

    It is better to post it in the wishlist forum.
     
  2. drponciano

    drponciano Member Licensed User

    Kind of embarrassed for this question but, how could I zoom in and out the pdf file read in example?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Use WebView to show the PDF. It supports zooming.
     
  4. drponciano

    drponciano Member Licensed 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: Nov 14, 2016
  5. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this in the questions forum.
     
  6. Descartex

    Descartex Well-Known Member Licensed 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.
     
  7. Descartex

    Descartex Well-Known Member Licensed User

    After 3 hours working on it, finally i got it.
    I share my solution if someone find it helpful.
    Code:
    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.
     
Loading...