Using Print2Flash OLE Automation API
To make use of Print2Flash OLE Automation API you need to consult your programming language or tool documentation to learn how to create and access OLE Automation objects from it. After you learn how to create OLE Automation objects in your language or tool, you can start using Print2Flash OLE Automation API. Basically this involves importing of Print2Flash OLE Automation API type library (TLB) file (p2fserver.tlb) or Interface Definition Language (IDL) file (p2fserver.idl). These files are located in Print2Flash SDK directory.
One of the problems using Print2Flash OLE Automation API from web page server scripts may be the fact that such scripts usually run under very restricted user account which may prevent the printing applications from proper working and sending document output to Print2Flash printer. In such a case it may be necessary to make Print2Flash server work under another user or administrator account with proper rights. This may be achieved with Setting up Automation Object User Account.
Below is the instruction on how to use Print2Flash Automation API from VBScript but this discussion and involved API usage technique pertains to other languages as well. The Print2Flash Automation API Reference contains comprehensive documentation for all languages and API usage samples for VBScript.
Using Print2Flash Automation API from VBScript
Using Print2Flash Automation API from VBScript is, perhaps, the easiest and fastest way to start using this API as it does not involve using type libraries. VBScript can be used in Windows Script Host environment to run script directly from Windows Shell, from web pages or from ASP scripts. Below we'll consider creating scripts for Windows Script Host as the simplest way to explore Print2Flash Automation API.
First, you need to create a Print2Flash Server object in this way:
Similarly, you may write additional code using Print2Flash Automation API Reference documentation and samples from there and test it by saving the code as .vbs files and launching the script.