Thank you for being a valued client of CM First Group. If you have any technical issues or concerns, please open a ticket on, email CM First technical support at or call us on our 24/7 customer hotline at +1 (512) 623-7586.


Open PDF Files in WebClient

This tutorial describes how to open a PDF file from WebClient by using a custom template. This template uses the panel title as the URL to open the file. To implement this template, follow these steps:

  1. In Eclipse, create a custom template file called “FileViewer-page.wcli” in your CustomTemplates project.

  1. Copy one the following code snippets in your “FileViewer-page.wcli” file(the code you use will determine how the PDF file will open).

Code 1: Will open the file in a different window

/(!JSOnLoad)!Panel:!Title), "_blank", "height=600,width=800");

Code 2: Will open the File inside the function panel that uses the template

	<embed src="/(!Panel:!Title)" width="100%" height="100%" />

NOTE: You can see the results of using these code snippets in step 6.

  1. In CA PLEX create the following functions:



  1. Open the Action Diagram for the “PDF_Viewer” function and add the following code in the “Pre Point Set Panel caption text”:
Cast  Environment<*Message text>, Input

This will set the received URL as panel title for the function in order to open the file using the custom template we have created.

  1. To open the PDF file, call the “PDF_Viewer” function. That this function requires the URL from the file as a parameter.

  1. Generate your functions and test them in Eclipse.

Test using the “Code 1” from step 2

Test using the “Code 1” from step 2

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk