How Do I Show a PDF Inside a Rich Client Form? (Magic xpa 3.x)
![](/PublicKnowledge/servlet/rtaImage?eid=ka2D0000000ThZV&feoid=00ND0000005rAjf&refid=0EMD0000000JHnA)
One of the easiest ways to display report output and other text data to a user is to put it in a PDF. Displaying a PDF to a user in Rich Client is very easy.
-
Add a Browser control to the form.
-
Set the Data fields to the name of the PDF. This can be hard-coded, as in the example, or it can be held in a variable to make it easier to change at runtime.
You can read more about working with a Browser control in How Do I Interact with a Web Page Running in a Browser Control?.
Note: The exact location of the PDF on the client machine might not be known to you while you are programming. See How Do I Transfer Files Between the Server and the Client Machine? for more information about how to correctly identify the location of a file on a client.
The Rich Client Samples project (program RRC08)
For mobile devices, see How Do I View a PDF in My Mobile Application?