Tahoma Italic Text problem

Stimulsoft Reports.NET discussion
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Tahoma Italic Text problem

Post by Ivan »

Hello,

We couldn't reproduce this bug.
In version 2011.1 in the ImageToBytes(Image image) method the try..catch operators are added, and exception should not occur there.
Please try to uninstall our product, find and remove all assemblies, clear GAC, and install our product again.
If the issue is still present, please send us a sample report with data or a simple test project, which reproduces the issue.

Thank you.
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

Tahoma Italic Text problem

Post by luczan »

Hello
i'm sorry, but report-rendering is a part of great application and it's impossible to send it.

But i added directly two projects (Stimulsoft.Base and Stimulsoft.Report) to my application to debug this problem. Exception occured when method ImageToString called method ImageToBytes (no in the code of ImageToBytes).

When i updated code of method ImageToString, report is rendered and no exception is occured.

public static string ImageToString(Image image)
{
if (image == null)return string.Empty;

//*************
byte[] bytes = new byte[0];
TypeConverter imageConverter = TypeDescriptor.GetConverter(typeof(Image));
try
{
bytes = (byte[])imageConverter.ConvertTo(image, typeof(byte[]));
}
catch
{
try
{
using (Bitmap bmp = new Bitmap(image.Width, image.Height, image.PixelFormat))
{
Graphics gr = Graphics.FromImage(bmp);
gr.DrawImage(image, 0, 0, image.Width, image.Height);
gr.Dispose();
bytes = (byte[])imageConverter.ConvertTo(bmp, typeof(byte[]));
}
}
catch
{
}
}

return Convert.ToBase64String(bytes);
//************

//byte [] bytes = ImageToBytes(image);
//return Convert.ToBase64String(bytes);
}
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Tahoma Italic Text problem

Post by Ivan »

Hello,

We made this improvements in our code.
Please check the next prerelease build from 12-Apr-2011 when it will be available and let us know about the result.

Thank you.
luczan
Posts: 32
Joined: Wed Jan 19, 2011 3:50 am
Location: Slovakia

Tahoma Italic Text problem

Post by luczan »

everything is ok with the last version from 12-apr-2011 , no exception is occured
thank you
Marek
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Tahoma Italic Text problem

Post by Alex K. »

Hello Marek,

Let us know if you need any additional help.

Thank you.
Post Reply