+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Print image from encoding


I’m trying to set the logo of a report dynamically. Is it possible to do this with the image encoded as a base64 string? Another type of encoding?

Hello Maurizio,

Welcome to our Forum!

Within .Net you can do something like this:

private Bitmap Bmp()
        string ImageText = @"YourBase64EncodedImage";
        Byte[] bitmapData = Convert.FromBase64String(ImageText);
        System.IO.MemoryStream streamBitmap = new System.IO.MemoryStream(bitmapData);
	    Bitmap bitImage = new Bitmap((Bitmap)Image.FromStream(streamBitmap));
	    return bitImage;

Then you may add the Image as a Variable:

ListLabel LL = new ListLabel(); 
LL.Variables.Add("Base64Image", Bmp());

And how can this be inserted in the designer?
(When I try to insert the bas64 string, the designer crashes.)

EDIT: via HTML Text (img-tag) ^^

Please note that it is currently not possible to use base64 string encoded images in an HTML object. We were unable to reproduce a crash during testing, but the image could not be displayed. Please use the image as described in the thread.

© combit GmbH