Hello and welcome to our forums,
In order to display a .PDF file by pressing a button on your dialogs, you have to firstly add your .PDF file as a temporary file, then create a custom action which will launch it. After doing so, you have to trigger your custom action when pressing the push button by creating an event.
Here is a step-by-step which will help you implement what you wish:
1) Firstly, we have to add the .PDF file as a temporary file. In order to do this, you can go to
"Files and Folders" page and then click on the
"Add Temporary Files" button from the toolbar.
2) Now we have to create the custom action which will launch the file. In order to do this, you can go to
"Custom Actions" page and add a
"LaunchFile" custom action without sequence. This custom action will be triggered from Dialogs page by all referring
"Execute Custom Action" control events. Under the
"Properties" pane, in the
"File to launch" field, insert the following command:
where
yourFile.pdf is the name of your earlier added file. Also, please keep in mind that you have to also uncheck the
"Fail installation if custom action returns an error" option, otherwise your installation will fail upon closing the .PDF file, because it will return an error code.
3) Now that we have created the custom action, we have to add the push button to our dialogs. In order to achieve this, you can go to
"Dialogs" page and click on the
"Control Toolbox" button from the toolbar and add the
"Push Button" to your dialog. After that, click on your button and under
"Published Events" tab, press on the
"New..." button -->
"Execute Custom Action" --> in
"Argument" field select
"LaunchFile" and let the
"Condition" field unchanged.
Hope this helps!
Regards,
Catalin