-
Notifications
You must be signed in to change notification settings - Fork 1
Microsoft .NET/Mono library for the Vuzit AJAX document viewer web services API
License
vuzit/vuzit.net
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
------------------------------------------------------------------------ -- Vuzit.Net -- Vuzit Web Services library for the Microsoft .NET Framework and Mono ------------------------------------------------------------------------ -------------------------------------------------- -- INTRODUCTION -------------------------------------------------- This is a library that allows developers to directly access the Vuzit Web Service API through short commands: http://vuzit.com/developer/web_service_api Below is a basic upload example: Vuzit.Service.PublicKey = "YOUR_PUBLIC_API_KEY"; Vuzit.Service.PrivateKey = "YOUR_PRIVATE_API_KEY"; Vuzit.Document doc = Vuzit.Document.Upload(@"c:\path\to\document.pdf"); Console.WriteLine("Document id: {0}", doc.Id); To get started all you need to do is download the code, sign up for a free account (https://ssl.vuzit.com/signup) and replace the public and private keys with the keys from your account. -------------------------------------------------- -- INITIAL SETUP -------------------------------------------------- * Choose the DLL for your .NET Framework version out of the Bin directory : * Bin\Vuzit.Net\DotNet\2.0\Release - DLL built with the MS .NET Framework 2.0 * Bin\Vuzit.Net\DotNet\3.5\Release - DLL built with the MS .NET Framework 3.5 * Bin\Vuzit.Net\Mono\2.2\Release - DLL built with the Mono 2.2 Framework * Bin\Vuzit.Net\Mono\2.4\Release - DLL built with the Mono 2.4 Framework * Add the DLL as a reference in your project. In Visual Studio right-click on the References item in the project menu, click on the Browse button and select "Vuzit.Net.dll". * You can also add Vuzit.Net to all projects on your machine by adding it to the global assembly cache. To do this run the following command: $> gacutil.exe /i Vuzit.Net.dll * To check if your install was successful add the following to a .NET project file (this assumes C#, use the appropriate version for C++/VB.NET, etc) and if it compiles without errors then you have succeeded: using Vuzit.Net; -------------------------------------------------- -- BUILDING FROM SOURCE -------------------------------------------------- There are several methods to build Nini. These builds all write files to the same directory structure as found in the INSTALL section above. * Visual Studio .NET Open the "Vuzit.sln" file with Visual Studio. To build the solution click "Build" -> "Build Solution". * NAnt (http://nant.sourceforge.net) In the Source directory there is a Vuzit.build NAnt file. Here is how to build for each runtime from the command line: To build MS .NET Framework 2.0 $> nant build-dotnet-2.0 To build MS .NET Framework 3.5 $> nant build-dotnet-3.5 To build Mono 2.2 $> nant build-mono-2.2 -------------------------------------------------- -- GETTING STARTED -------------------------------------------------- * Download the code - http://github.com/vuzit/vuzit.net/downloads * Sign up for a free Vuzit account - https://ssl.vuzit.com/signup * Code Examples - http://wiki.github.com/vuzit/vuzit.net/code_examples * Vuzit API Reference - http://wiki.github.com/vuzit/vuzit.net/api_reference * Change log - http://wiki.github.com/vuzit/vuzit.net/change_log -------------------------------------------------- -- EXAMPLES -------------------------------------------------- Find Document Example - how to load a document Vuzit.Service.PublicKey = "YOUR_PUBLIC_API_KEY"; Vuzit.Service.PrivateKey = "YOUR_PRIVATE_API_KEY"; Vuzit.Document doc = Vuzit.Document.Find("DOCUMENT_ID"); Console.WriteLine("Document id: {0}", doc.Id); Console.WriteLine("Document title: {0}", doc.Title); Delete (destroy) Document Example Vuzit.Service.PublicKey = "YOUR_PUBLIC_API_KEY"; Vuzit.Service.PrivateKey = "YOUR_PRIVATE_API_KEY"; Vuzit.Document.Destroy("DOCUMENT_ID"); Upload and View with the JavaScript API Example <% // Set the public and private keys Vuzit.Service.PublicKey = "YOUR_PUBLIC_API_KEY"; Vuzit.Service.PrivateKey = "YOUR_PRIVATE_API_KEY"; // Substitute the code below with the Vuzit document ID. string documentId = "XXXXXXX"; DateTime date = DateTime.Now; // Upload "timestamp" parameter string timestamp = Vuzit.Service.EpochTime(date).ToString(); // Upload "signature" parameter string signature = Vuzit.Service.Signature("show", documentId, date); // Creates a URL-encoded signature string encodedSig = Vuzit.Service.UrlEncode(signature); %> <html> <head> <link href="http://vuzit.com/stylesheets/Vuzit-2.9.css" rel="Stylesheet" type="text/css" /> <script src="http://vuzit.com/javascripts/Vuzit-2.9.js" type="text/javascript"></script> <script type="text/javascript"> // Called when the page is loaded. function initialize() { vuzit.Base.apiKeySet("<%= Vuzit.Service.PublicKey %>"); var options = {signature: '<%= encodedSig %>', timestamp: '<%= timestamp %>', ssl: true} var viewer = vuzit.Viewer.fromId("<%= documentId %>", options); viewer.display(document.getElementById("vuzit_viewer"), { zoom: 1 }); } </script> </head> <body onload="initialize()"> <div id="vuzit_viewer" style="width: 650px; height: 500px;"></div> </body> </html> -------------------------------------------------- -- MORE INFORMATION -------------------------------------------------- For more information, including installation visit: http://vuzit.com/developer -------------------------------------------------- -- LICENSE -------------------------------------------------- Copyright (c) 2009-2010 Brent Matzelle, Vuzit LLC Released under the MIT license: http://www.opensource.org/licenses/mit-license.php This means you can use it in proprietary products. See LICENSE file. -------------------------------------------------- -- Feature Requests and Bug Reports -------------------------------------------------- Email to support AT vuzit DOT com
About
Microsoft .NET/Mono library for the Vuzit AJAX document viewer web services API
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published