Wish PDF Viewer with zoom and scroll

johan vetsuypens

Member
Licensed User
Longtime User
In B4A you could use the below intent to view a PDF file. Would be nice to have the same functionality in B4i

Dim i As Intent 'Requires a reference to the Phone library
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal , "data.pdf"))
i.SetType("application/pdf")
i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
Activity.Finish

Thanks,
Johan
 

shashkiranr

Active Member
Licensed User
Longtime User

Hi Erel,

When i try the above code, only a white screen appears.

Regards,
SK
 

shashkiranr

Active Member
Licensed User
Longtime User
Yes Erel. It does. I have attached the project. I feel i am doing some stupid mistake.

Regards,
SK
 

Attachments

  • dummy2.zip
    22.8 KB · Views: 319

mtechteam

Member
Licensed User
Longtime User
Erel,

We have the same issue. Our quirk is that it works great in debug but not in release. This is b4i, whether 1.x or 2.0. Any thoughts? Here is a file with the pertinent code.

Tm
 

Attachments

  • snippet.txt
    270 bytes · Views: 269

mtechteam

Member
Licensed User
Longtime User
Sorry, should have thought about doing that. Here it is. Running in debug works, but not in release.

Thanks,
Tm
 

Attachments

  • PDFInWebview.zip
    172 KB · Views: 357
Cookies are required to use this site. You must accept them to continue using the site. Learn more…