Teach WebExplorer to read!

Want to use WebExplorer to read Adobe Acrobat documents (.PDF) files? Then use this previously undocumented procedure to get the code you need, edit the setup files, and use WebExplorer like it has never been used before.

Note: this procedure may not be for the slight at heart, and requires a better-than novice understanding of the OS/2 operating system, however, if you already have Acrobat working in OS/2, you can skip to step 3.

Step 1 Correct your WIN-OS2 Session
Your WIN-OS2 sessions have to have the correct settings for Acrobat Reader to work. In the Settings notebooks for both the WIN-OS/2 Window and WIN-OS/2 Full Screen objects, change the following settings:

*Select WIN-OS/2 settings...
*Select WIN-OS/2 settings, then OK
*In the Setting: window
*select WIN_ATM and then On
*select WIN_RUN_MODE and then 3.1 Enhanced Compatibility

*Select Save to save the changes to your WIN-OS2 Settings.

Step 2 Make Adobe Acrobat Reader OS2-ready
If you don't have Adobe Acrobat Reader, go to the Free Acrobat Reader Software for Windows page and download Adobe Acrobat Reader 2.1 for Windows. What you get from Adobe is ACROREAD.EXE, which when run, prompts you for an installation directory and installs the reader.

Note: run ACROREAD.EXE from within a WIN-OS/2 session that's running in 3.1 Enhanced compatibility mode (see Step 1). If you try to run this installation program from an OS/2 window, it won't work.

Next, create an Adobe Reader object on your OS/2 desktop so you can test your installation of the reader. Find your Templates folder and drag a Program template to your desktop. In the Settings notebook, make the following modifications and then test your new object:

Program tab
Put the full path for ACROREAD.EXE in the Path and file name field, for example, you would enter C:\acroread\acroread.exe if you had installed the reader to your C drive in the "acroread" directory.
Sessions tab
Check your WIN-OS2 settings for this object using the procedure outlined in Step 1 above.
Association tab
Enter *.pdf in the in the New name field, then select Add to add the pdf-file definition to the list of current names.
General tab
Enter a new title into the Program field for the new object you just created. Perhaps "Adobe Acrobat Reader" would do?
Step 3 Edit explore.ini
Modify the [advanced] section of your explore.ini file (the easiest way to find it is to type
dir /s explore.ini
at the command line). Add the fully-qualified path for your mailcap and extmap files (if you don't already have these files, you are going to specify where they will reside). In the following example, TCP/IP is installed in c:\tcpip:
  [advanced]
  ; advanced user settings - edit with care! 
  ;
  ; mailcap= specifies full path to user mailcap file
  ; format is:  mime/type; program_name params %s
  ; example:    image/jpeg; jview -r %s
  ; no wildcards allowed, no piping, no unix commands 
  mailcap=c:\tcpip\etc\mailcap
  ; extmap= specifies full path to user extension map file
  ; format is:  mime/type     extension_list
  ; example:    image/jpeg    jpg jpeg jpe  
  extmap=c:\tcpip\etc\extmap 

Step 4 Edit or create mailcap
Edit the mailcap file by adding the following line (or if no mailcap file exists, create one in the directory specified in the [advanced] section of explore.ini):
application/pdf; c:\acrogo.cmd %s

Note: you are going to create the file acrogo.cmd shortly; the line above specifies the location for where that file will be created.

Step 5 Edit or create extmap
Edit the extmap file by adding the following line (or if no extmap file exists, create one in the directory specified in the [advanced] section of explore.ini):
application/pdf pdf

Step 6 Create the acrogo.cmd file
Using the location specified in the mailcap file, create the acrogo.cmd file or get a sample file from us that you can update. Your file should have the following format (see the Notes following this example):
    /* Launch Adobe Acrobat */
    Call RxFuncAdd 'SysLoadFuncs','REXXUTIL','SysLoadFuncs'
    Call SysLoadFuncs
    tmpname = SysTempFileName('C:\TCPIP\TMP\???????.PDF')
    Parse Arg infile
    CmdStr = 'x:\...\acroread.exe' infile tmpname
    CmdStr
    Call SysSetObjectData tmpname, 'OPEN=DEFAULT' 
    Exit 0

Notes:

Step 7 Restart WebExplorer, and enjoy!
Now that you've completed the steps, you probably can't wait to try it out. Here's a sampling of what you might find on the web, in PDF format:

* IRS Tax Forms
* IBM PC Server performance reports

Note: Make sure WebExplorer is configured to cache documents and images, 100 or so for each. If the numbers are lower (25-30) and WebExplorer reaches that limit, it may fail with an 'Unable to open temporary file...' message.

Return to top of page

[ IBM home page | WebExplorer home page | Order | Search | Contact IBM | Help | (C) | (TM) ]