Links may not function; however, this content may be relevant to outdated versions of the product.
Making a PDF file available for offline viewing
At design time, you can make a PDF file available for offline viewing by associating the PDF file (which has already been uploaded to the Pega 7 Platform instance) with a button, link, or icon in the Pega Mobile Client app. To view the PDF file at run time, the offline user taps the button, link, or icon in the app.
- Upload the PDF file to a Rule-File-Binary rule
- List the PDF file in the pyCustomAppCache file
Upload the PDF file to a Rule-File-Binary rule
Make sure that the name of the PDF file to be uploaded is saved in lowercase.
- If you are not already logged in to the Pega 7 Platform, log in.
- From the header, click Technical > Binary File. >
- Enter the name of the PDF file (without the .pdf extension) in the Label field.
- Enter the app name in the App Name (Directory) field.
Creating a binary file
- Click .
and select the PDF file from your local directory that you want to make available in the Pega Mobile Client app, for example:
- Click .
After you save the PDF file to a Rule-File-Binary rule, you can associate it with a button, link, or an icon in your application's user interface. When a user clicks the button, link, or icon at run time, the
- Open the section of the user interface with the button, link, or icon and click View Properties for the control.
- From the Actions tab, click .
- Click Add an action, and then click All actions and choose the
Run scriptaction from the list.
"pega.ui.pdf.view". Make sure that you include the name within quotation marks.
- In the Parameters section, add the first parameter.
applicationNamein the Name field.
- Enter the name of the application within quotation marks in the Value field, for example: "
- Add a second parameter.
pdfNamein the Name field.
Enter the name of the PDF file (without the .pdf extension) within quotation marks in the Value field, for example:
Adding a local action to view a PDF file
- Click , and then click
List the PDF file in the pyCustomAppCache file
To complete this process, make sure that the PDF file is listed in the mobile application's pyCustomAppCache file. For the example displayed above, add the following entry:
- In the search bar in the header, enter
- From the results that are returned, click pyCustomAppCache to open this HTML rule.
webwb/vwgti.pdfin the HTML Source data field.
Editing the pyCustomAppCache file
- Click .