Ibex Installation

Trial versions of Ibex for .Net can be downloaded for evaluation free of charge. Unless a license is purchased versions which are downloaded for evaluation will expire in 30 days.

Ibex for .Net 6, .Net 7, .Net 8, .Net 9


The latest version of Ibex works on .Net 6, 7, 8 and 9. This version works on Windows and Linux operating systems.

Ibex is installed as from nuget.org as two separate components.

Ibex.PDF.Creator

The Ibex.PDF.Creator package contains the library which you will link to your own application. This can be downloaded either using the "Manage Nuget Packages" menu option from within Visual Studio or using the "dotnet add package" command on the command line.

Ibex.CommandLine

The Ibex.CommandLine package is a console application to create PDF files from the command line, for use during testing and development. The Ibex.CommandLine package is a dotnet tool. This is installed from a command shell like so:

dotnet tool install -g Ibex.CommandLine

An existing installation can be updated using this command:

dotnet tool update -g Ibex.CommandLine

It can be uninstalled using this command:

dotnet tool uninstall --global Ibex.CommandLine

The Ibex.CommandLine tool, when it is installed as a dotnet global tool, is accessed using the command "ibex". So for example if we had a file called 'test.fo' this command would created a PDF file from it:

ibex test.fo test.pdf 

Installation for .Net Framework 4.8


The latest version of Ibex works on .Net Framework 4.8. This version works on Windows operating systems.

.Net Framework 4.8 does not support the "dotnet tool" command line approach used for .Net 6 and above. Instead here we show how to add the Ibex component to a program using Visual Studio 2022.

Creating a Project

Open Visual Studio 2022, use the File > New > Project menu to open the project creation dialog and select these options to create a .Net Framework based application:

Press "Next" and then name the project and specify its location and make sure to choose ".Net Framework 4.8" as the framework.

Press "Create" to create the project. You should see this window showing the project files in the Solution Explorer window (which might be on the left or the right side of the screen) and the contents of the file Progam.cs.

Adding the Ibex component

Right-click the project name (in this case "IbexTest") and select "Manage Nuget Packages..."

Click on the "Browse" tab at the top of the window and type "ibex pdf creator" in the search bar and press enter. This should show the Ibex.PDF.Creator package, click this and the click the Install button on the far right:

After a few seconds and possibly some confirm dialog boxes, if you click on the "Installed" tab you should see something like this, showing which components have been added to the project:

If you want you can update some of these packages to the latest versions. Do not update the version of SixLabors.ImageSharp to 3.1.4, this version only works with .Net 6 application it will not work with .Net Framework 4.8 applications.

Adding Code

Edit the file Program.cs and replace all its code with this code:

using ibex4;
using System.IO;
using System.Text;

public class test
{

    static void Main(string[] args)
    {
        string FO = "<fo:root xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">"
            + "<fo:layout-master-set>"
            + "  <fo:simple-page-master master-name=\"page\" margin=\"36pt\" page-height=\"11in\" page-width=\"8in\">"
            + "    <fo:region-body margin-top=\"78pt\"/>"
            + "  </fo:simple-page-master>"
            + "</fo:layout-master-set>"
            + "<fo:page-sequence master-reference=\"page\">"
            + "  <fo:flow font-family=\"Arial\" font-size=\"11pt\" flow-name=\"xsl-region-body\">"
            + "    <fo:block border=\"1pt solid green\">Hello World</fo:block>"
            + "  </fo:flow>"
            + "</fo:page-sequence>"
            + "</fo:root>";


        byte[] byteArray = Encoding.UTF8.GetBytes(FO);
        MemoryStream inputStream = new MemoryStream(byteArray);
        inputStream.Seek(0, SeekOrigin.Begin);

        FODocument gen = new FODocument();
        using (FileStream pdfStream = new FileStream("test.pdf", FileMode.Create, FileAccess.Write))
        {
            gen.generate(inputStream, pdfStream);
        }
    }
}

Compile this program.

Testing

You should now be able to run the program and create the file "test.pdf". Depending on the project setup this will appear in the current directory which might be for example in bin\Debug.