in Search
 
Home Blogs Forums Marketplace Files
 
 
 

Bryn Nunweiler

Using the Alchemy Viewer

The document viewers that alchemy uses can be very useful when viewing a wide variety of documents and images. These viewers can be accessed through the API, and used in custom applications as well as in Captaris Workflow. This document will detail how to programmatically access these viewers.

 

There are two Alchemy Viewers; A web based viewer called ‘FirstViewer’, and a Windows based client.

 

The window based client can be accessed in the following manner:

 

1)    Reference the Alchemy.dll

2)    Instantiate the Alchemy Application object and DefaultViewer through the following code:

 

            Alchemy.Application oApp = new Alchemy.Application();

            oApp.LoadOptionsFile("");

            oDefaultViewer = oApp.DefaultViewer;           

            oApp = null;

 

3)    Assign the Viewer status and Owner:

 

 oDefaultViewer.SetCmdStatus(Alchemy.AuVwrCmdEnum.auVwrUpOneLevel, Alchemy.AuCmdStatusEnum.auCmdNotAvailable);

 

 oDefaultViewer.SetOwner(ViewerPanel.Handle.ToInt32(), false);

 

This code sets the Owner by getting the user Handle from the Viewer Panel.

 

4)    Give the Viewer a document to View:

 

oDefaultViewer.ViewItem(oDefaultViewer.Application.Databases.Add(strDatabaseName).GetItemByID(intAlchemyItemID));

 

This code passes the item to veiw, by getting the object Item ID from one of the Alchemy Databases. 

 

Finally, the user can set the Viewers properties to talor the desired behavior. This includes Height, Width, ReadOnly, FullScreen as well as serveral others.

 

The simplest way to use the FirstViewer is to reference it from the existing AlchemyWeb:

 

1)    The FirstViewer is stored under the AlchemyWeb of the Alchemy Server, under the http://[servername]/AlchemyWeb/ViewItemPage.aspx

 

2)    To use it, you must pass the viewer the Database Name (db=DatabaeName), and the Item Number (item=99). For Example:

 

http://localhost/AlchemyWeb/ViewItemPage?db=DatabaseName&item=99

 

 

Published Monday, April 23, 2007 4:40 PM by Bryn Nunweiler

Comments

 

smunjal said:

Hi,
Thanks for sharing a great tip. How one can use the Alchemy Viewer to do search and open the results? For e.g. we have a profile field of "account number" and we want to search all the documents which have account number of "362982". We want to invoke the alchemy viewer showing the database/databases showing the results of the seach.
Thanks.
June 24, 2007 6:57 PM
 

smunjal said:

Just to confirm that your code refer to Alchemy.dll. Where one should find this? I don't think average search client does have this dll. I am trying to invoke the default viewer using .net/com code but cannot find this dll. Thanks.
June 24, 2007 8:02 PM
 

iannai said:

I have posted in the forum but got no responses yet. In the API documentation it states that the viewer can display files both inside and outside of an Alchemy database. How can I get the viewer to display a document not yet inserted into Alchemy - e.g. preview a document located on a users HDD?

There is a method "ViewFile" as opposed to "ViewItem" which accepts a string argument as a path to a file, but the method returns an exception saying it's for "internal use only" - any ideas?
October 16, 2007 3:57 AM
Anonymous comments are disabled

This Blog

Post Calendar

<April 2007>
SuMoTuWeThFrSa
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

Syndication

  Privacy    Site Terms   Contact Administrator