Ibex Runtime Keys
Deploying to test and production systems
Applications should be installed into production environments using a runtime key. Developer licenses should not be installed on test or production systems.
An Ibex developer license file (called xmlpdf.lic) is in XML format and contains an attribute called "runtimekey". This is a string looking something like this "000200507288C93A81CCXTTRCTRDZMYVZEJK7RPA==".
To activate the key, pass it to the ibex4.licensing.Generator.setRuntimeKey() API before any FODocument objects are created, like this:
using ibex4;
public class Test {
static void Main( string[] args ) {
string key = "000200507288C93VZEJK7RPA==";
ibex4.licensing.Generator.setRuntimeKey( key );
FODocument gen = new FODocument();
gen.generate( "test.fo", "test.pdf" );
}
}
Building an example program
To build the above code from the command line follow the following steps:
- Create a new project class, for example, "testibex"
dotnet new console --name testibex
- change to the project directory
cd testibex
- add a reference to Ibex
dotnet add package Ibex.PDF.Creator
- edit the Program.cs file created when the project was created and replace its contents with this:
using ibex4;
public class test {
static void Main( string[] args ) {
string key = "000200507288C93VZEJK7RPA==";
ibex4.licensing.Generator.setRuntimeKey( key );
FODocument gen = new FODocument();
gen.generate( "svgradial.fo", "svgradial.pdf" );
}
}
- build the project
dotnet build
-
Download these two test files and save them into the testibex directory
-
execute the program, creating svgradial.pdf
dotnet run
Notes
The key in the code above is not a real runtime key, you will need to insert your own key.
Ibex checks whether the runtime key is in use the first time an FODocument object is created. If you deploy your application to IIS you may need to restart IIS the first time you use the runtime key
Set the runtime key only once
The runtime key sets a static variable in memory within your application. It only needs to be set once when the application starts running, not once for every FODocument object created.