View Full Version : Please Help

03-22-2005, 06:19 PM

I am really having difficulty using adobe with demoshield. I am aware that this issue has been addressed in the past. However, am very new with demoshield and need help enabling the viewers of my demo to view and print adobe files. What is the easiest way to do this. I would like to include adobe on the distribution CD. I am completely clueless as to how it all works.

I would appreciate it if someone would be able to get back with me with simple step by step instructions on how to do this.


03-22-2005, 06:31 PM
Maybe you missed my reply to your post in an earlier thread. Or maybe you just didn't deem the step-by-step instructions I provided as simple enough to follow. I'll post it again here in just case.

I deploy a lot of PDFs in the various projects I create using DemoShield. I'm also using DemoShield 7.53.

Here's what I do. This may seem a bit daunting at first glance, but it's really not hard at all. :)

Suppose your PDF file is included in the <bin> folder off the root of your CD-ROM. (Don't import the PDF into the demo itself). So maybe you have a directory structure like this on the CD:







...where file.pdf represents the PDF you want the user to read and print.

Typically, I launch the PDF after the user clicks a button.

First, I create an event that checks to determine whether the user has Adobe Reader installed or not.

1. Make a new event. On the Object Styles tab, make sure the time when the object will happen is outside the end of your scene's time. So if your scene is 60 seconds long, make sure this new event is at 61 seconds or later. You don't ever want it to happen by itself, only when you tell it to happen.

2. For the conditions, you want the event to "Check Custom Condition". If that's not the default setting, delete whatever condition is there and click New, then choose Custom from the list of Condition Types.

3. In the Condition Description area, click the first underlined item <Global Variable/Object>.

4. In the Condition Details below, click the drop-down under "Select left hand side of the equation". Select Global Variable.

5. Click the drop-down under "Select Global Variable" and scroll down a ways, then select IsPDF. This variable tests whether the user's workstation has an application already associated with PDF files.

6. Back up in the Condition Description, skip the equals item and click the <Global Variable/Object/Constant>.

7. Again, in the Condition Details below, click the drop-down under "Select left hand side of the equation". Select Constant(Numeric).

8. In the Enter Constant Value field, enter 1.

9. Click Apply.

Now you'll tell the event what to do in case there is (or is not) an application installed on the user's workstation that can handle PDFs.

10. On the Actions tab, higlight "True Actions" and click New.

11. The drop-down under Action will be highlighted by default. Press "L" three times on your keyboard to select Launch Associated Application.

12. Click the only field on this dialog (next to the Insert Token button) and enter <path>file.pdf<path> where "file.pdf" represents the name of your PDF file. Note: If you aren't running both the PDF file and Demo32.exe inside the <bin> folder on the CD-ROM, you'll need to use a different path to access the PDF file.

13. Click Finish.

So now if the user has an application installed that can handle PDFs, you're set. But what if the user does not have? I include an executable for installing Adobe Acrobat Reader 4.0 in a separate folder on my CD-ROM. The name of this installer file is RS405ENG.EXE. When the installer is run, it installs Adobe on the user's workstation. This installer file can be obtained from Adobe. Suppose you put the installer file in the <adobe> folder on your CD-ROM.

14. Highlight "False Actions" and click New.

15. Press the "L" key on your keyboard once to select Launch Application, and click Next.

16. For the Application Name, enter <path>..\Adobe\RS405ENG.EXE<path>.

17. Use the following options:
Set Current Working Directory? No
Application Command Line (nothing, leave it blank)
Wait for the application to end? Yes (you want it to finish installing before you try to use it to launch your PDF).
Message to display if application not found: None

18. Click Finish. You're almost done!

19. With "False Actions" still selected, click New again. You still need to tell your demo to launch the PDF file once it has finished installing Adobe.

20. Repeat steps 10-13 to create another Launch Associated Application action, this time under "False Actions", and AFTER the Launch Application action.

21. Click OK. Your event is finished.

Now all you have to do is assign this event to happen when your user clicks a button (or whenever you want the PDF to be displayed). So in your button's Object Properties, on the Actions tab, select the "Left-Clicks Mouse Up" action and click New. Press "T" on your keyboard twice to select Trigger Event, and then specify the Scene Name and the Object Name (select the event you created using steps 1-21). The Event Name will be Time, and you just need to specify a timer LATER than the time of the event itself. So if, in step 1, you used a time of 61 seconds, enter 62 for the Event Trigger Time.

Click Finish and then click OK to complete the button actions, and you're done!

Your user will be able to print the PDF from the Adobe application that opens it. It's not necessary to compile the demo for distribution in order to do this.

Hope this helps. :)

03-23-2005, 03:56 PM
These are great instructions Ethan. I really really really appreciate you helping me.

I am in the process of getting my installer file from Adobe.

I know you said that it is not necessary to compile the demonstration for distribution in order to do this but, i never see the directory structure until I compile it.

I removed the PDF file from the demo, as I had imported earlier, and you said not to do this.

How does the PDFand the installer file (which I now have) become a part of my demonstration directory? Or should I do what you do and create a seperate file? What is the best way? This is my first time. I would like to learn from your mistakes and do it your way.

One more thing, in step number 4, I only have the option to select "right hand side of the equation" not the left. Does it make a big difference?

I will launch the PDF when the viewer clicks a button too.

Your help is greatly appreciated.

PS. i copied and pasted it to this thread because i am concerned that you will not receive my reply.

03-23-2005, 08:11 PM
No problem. I have replied again in the original thread so we won't keep posting to two threads. :)