How do I install the Vault Perl client under IIS7 (Windows 2008)
The Perl Sample is a web application that makes use of the Vault protocol to implement a basic document viewing application. The Perl Sample consists of a set of CGI scripts that communicate to other Vault processes to perform search and document rendering operations. The scripts are provided in source form and can be modified for your specific needs.
You will need a Perl interpreter and a web server capable of hosting CGI applications. On Windows, typically the web server would be IIS. You can obtain a Perl interpreter from ActiveState (www.activestate.com
). On Unix, typically the web server would be Apache. Most Unix systems come with a Perl interpreter. Different Perl interpreters will come with different sets of packages. You may need to download and install additional Perl packages if your installation is missing one.
The Perl Sample can be installed from the Vault installer by choosing a Full Install or by selecting the Perl Sample component during a Custom Install. The Perl Sample can be installed on the same machine as other Vault components or on an entirely separate machine. Once installed, there will be a sample
directory under the vault install that contains the Perl sample.
|sample\images||images used by the sample|
|sample\modules||library modules used by the sample|
|sample\scripts||CGI scripts that make up the sample|
|sample\templates||Fragments of HTML used by the sample to construct output web pages|
Web Server Configuration
You will need to configure your web server with the following virtual directories:
There are often significant differences in the way applications are configured between different web servers and web server versions. You should refer to your web server’s documentation for the precise steps needed to properly configure CGI applications.
|Virtual Directory||Physical Directory||Access Rights||Default Document|
Example: Installing the Perl Sample on Windows Server 2008 R2
The following steps show and example of how to configure the Perl Sample for use with IIS7 on Windows Server 2008 R2. You will need an existing vault installation the Perl Sample can access and a machine running Windows Server 2008 R2.
Install and Configure the Perl Sample
Copy or install the Perl Sample to the Windows Server 2008 machine. Use a text editor to edit interface.pl and image.pl so you can set the address an port of the rendering engine:
Install Internet Information Server
|Start the Server Manager and navigate to Roles.|
|Choose add Roles.|
|Check Web Server (IIS).|
|Make sure to select CGI from the Role Services.|
Run Windows Update
|Run Windows update to fetch any patches applicable to the system or IIS.|
|Run the ActivePerl installation program.|
You can get ActivePerl from: www.activestate.com
|Note the installation location. You’ll need it later to set up the script mapping in IIS.|
|Set up the default environment and extension settings for convenience sake.|
|Allow the installation to complete. You should open a command prompt and run perl -v to verify that the Perl interpreter is running correctly.|
|Run IIS Manager and navigate to the default web site.|
|Add the image virtual directory. It should point to where sample\images was installed.|
|Add the scripts virtual directory. It should point to where sample\scripts was installed.|
|Select the scripts virtual directory.|
|Select Default Document.|
|Remove the existing list of default documents.|
|Add interface.pl to the list of default documents. This is the main CGI script.|
|Now select Handler Mappings. The scripts virtual directory should still be selected.|
|Add the script mapping for Perl Scripts.|
Use the settings show to the left adjusting for the location where your Perl interpreter was installed.
|Click no to the ISAPI extension prompt.|
|Now Perl scripts in the scripts directory should be excutable.|
Test the Result
|Browse to the script directory on your web server.|
|The default search screen should come up. Try submitting a request and viewing a document.|
· you can use a different name for the virtual directories
· if you alter the image virtual directory name, edit interface.pl and update the value for $imgdirectory to reflect the change
· Previously the Perl Sample was implemented using ActiveState’s perlis.dll (.plx). While this solution can improve performance experience with it showed that some versions were not always stable under load. As a result we decided to revert to ordinary CGI which is much more stable.
· The Perl Sample is not written for use with mod_perl.
Using the Perl Sample
When you first navigate to the Perl Sample’s URL, you are presented with the default search screen:
At this point you would typically select a search type, enter a key and submit the search:
From this list of results, clicking the underlined links will take you to the document associated with the result. If the search type lists accounts clicking the link will let you view the most recent document associated with the account.
At this point you can navigate around the current document, select another document from this account or start a new search. See below for a discussion of the available controls.
|Search Type||Search Key||Search|
|Select a named search type from the drop down list.||Enter a value to search for. Results will start with the value specified.||Click this button to execute a search once you’ve selected a search type and a key.|
|Select Database||Selected Account|
|This drop down box lets you switch between databases.||If there was a previously view account, its account number is specified here. This can enable certain types of searches such as a “Document Under Account” search.|
|This area of the search screen lists matches to the search you previously submitted. The first column’s value will have a clickable hyperlink that takes you to the selected account or document.|
Note: database properties, including search settings are specified in the server’s database.ini configuration file.
|Change Account||Select Document||Go to Page|
|This field lets you enter a new account number to switch to from the view page. If the number is not unique it will switch to an account search page.||This drop down box lets you select which document to view from the selected account.||This input box lets you go to a page number you specify.|
|Go to Section||Export Section As PDF|
|Select a named section from the drop down list and its first page will be displayed. If no sections are present, this control will not be displayed. Sections are also known as reports or bookmarks.||This option takes a range of pages corresponding to a named section of the document, exports it to PDF and then views it.|
|Search||View as PDF||View as PDF with no backgrounds||View as Text||View as TIFF|
|Switch to the search page and being a new search.||Convert the entire document to PDF and view it.||Convert the document to PDF and view it. Do not show emulated stock backgrounds. You can use this mode as a way to print to preprinted stock.||Convert the entire document to text and view it.||Convert the entire document to TIFF and view it.|
|First Page||Backward 5 Pages||Previous Page||Next Page||Forward 5 Pages||Last Page|
|Move to the first page.||Move backwards 5 pages. The number of pages moved can be changed in the interface script.||Move to the previous page.||Move to the next page.||Move forwards 5 pages. The number of pages moved can be changed in the interface script.||Move to the last page.|
|Zoom In||Normal Zoom||Zoom Out||Rotate Left||Normal Rotation||Rotate Right|
|Zooms in to the document.||Returns the zoom level to the default value.||Zooms out from the document.||Rotate the page left.||Return the page orientation to the default value.||Rotate the page right.|
|Page Image||Page Text||Page Decode||Page Comments||Document Info|
|Show the current page as an image (default).||Show the current page as text.||Show a decode of the current page.||Show any embedded page comments.||Show internal document information.|
|Multiple Pages||Reprint Document|
|Show multiple pages if available. Switches between 1, 2 and 4 pages at a time when available. This also alters the numbers moved by the navigation controls.||Convert the document to its original format and submit it to the server for reprinting. A status message is displayed under the toolbar.|