1. Andres Slachevsky
  2. PowerServer Mobile (Obsolete)
  3. Wednesday, 27 May 2020 21:04 PM UTC

Hello All,

What will be the way to open a PDF file in a mobile app.

we manage to get the PDF but we have no manage to open it

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 May 2020 13:51 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hi Andres;

   FWIW:  For my mobile Apps, I use the PB based iNET object and its HyperLinkToURL() method. 

Note1: You may need to install a PDF viewer on your mobile device.

Note2: When building PDF's in native PB for sharing on the mobile platform, use the PDF/A format to be compatible.

Regards ... Chris

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 May 2020 07:43 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

Hi Andres,

The Webview control does not support to load local pdf file, but if you put the PDF file on a Web site accessible via Internet, and allow the mobile device to connect with the Web site and Google Docs (docs.google.com), then Appeon can parse the PDF file online via Google Docs (docs.google.com) and then load the PDF file into the Android device, please refer to article below for more detail.
https://docs.appeon.com/appeon_online_help/ps2019/workarounds_and_api_guide/ch01s04s16.html#d0e25181

 

You can also use run function on Android to open PDF file. below is the description of run function on Android.
https://docs.appeon.com/appeon_online_help/ps2019/features_help_for_appeon_mobile/ch06s01s01.html#System_Functions_System___Environment_Functions


This function is supported in Android only, and unsupported in iOS.
Run ( string {, windowstate } )
The string parameter can only be the full path of the file name; it cannot be a program name, or a file name without a path. The windowstate parameter is unsupported; the program window will be maximized by default when run in Android.
Supported syntax:
Run ("/storage/emulated/0/android/data/com.appone.mobile/files/626342311/plugin/test.pdf")
This will give control to Android, and Android will decide whether to prompt the user to select a program to open the PDF file (if there is more than one PDF viewer program installed on it), or directly open the PDF file if only one PDF viewer program is detected or a default PDF viewer program is set before. Then the Appeon mobile app will be switched to run in the background, and the PDF viewer program will be running at the foreground.
Unsupported syntax: Run ("Clock", Minimized!)


Regards,
ZhaoKai

Comment
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 May 2020 21:20 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 3

Try loading it in the WebView control.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.