jzdecourcy 0 Report post Posted March 25, 2008 I have a simple radial gauge with a custom background image that looks fine in the browser (IE 6+), but when viewed in print preview or actually printed the labels for the main scale become "blotchy". Is there some trick to configuring a gauge for optimum printability? Quote Share this post Link to post Share on other sites
maximop 0 Report post Posted April 9, 2008 Unfortunately, there is no way to optimize the look for the gauge labels; however, as a workaround, you could export the gauge to a memory stream, and draw the image directly to the Print Object in the PrintPage() Event using GDI+. You could provide a button in your application for PrintPreview, for example, which will fire this PrintPage() event thus showing the gauge image with much better quality. Below, please find a code snippet on how to implement this solution: public partial class _Default : System.Web.UI.Page { private MemoryStream ms;protected void Page_Load(object sender, EventArgs e) {ms = new MemoryStream(); RadialGauge1.MainValue = 75; RadialGauge1.MainScale.Min = 0;RadialGauge1.MainScale.MinAlwaysDisplayed = true; RadialGauge1.MainScale.Max = 100; RadialGauge1.MainScale.MaxAlwaysDisplayed = true;RadialGauge1.Export(ImageFormat.Jpeg, ms); ms.Position = 0; PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);System.Windows.Forms.PrintPreviewDialog ppd = new System.Windows.Forms.PrintPreviewDialog(); ppd.Document = pd; ppd.ShowDialog(); } void pd_PrintPage(object sender, PrintPageEventArgs e) {e.Graphics.DrawImage(System.Drawing.Image.FromStream(ms), new Point(25, 25)); } } Quote Share this post Link to post Share on other sites