Salesforce

How Do I View a PDF in My Mobile Application? (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

How Do I View a PDF in My Mobile Application? (Magic xpa 4.x)

On iOS devices:

You can view a PDF using Magic xpa's internal Browser control.

Note that the PDF should be located on the server and not locally on the device.

On Android devices:

Most of the Android browsers do not display PDFs. Therefore, you cannot use Magic xpa's internal Browser control to view a PDF.

However, you can view a PDF using a third-party PDF viewer application. You do this as follows:

  1. Create an Invoke OS Cmd operation.

  2. Make sure that the Execute On property is set to Client.

  3. Set the command with a syntax of pdf:filename where filename is a path to a local file.

For example, the following command will copy the ReleaseNotes.pdf file from the C:\Magic\ folder on the client and will open a PDF viewer to show this file: Invoke OS 'pdf:/' & ServerFileToClient('C:\Magic\ReleaseNotes.pdf')

Reference
Attachment 
Attachment