We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridPrintDocument : Barcode Reading problem

Thread ID:

Created:

Updated:

Platform:

Replies:

60358 May 3,2007 07:57 AM UTC May 3,2007 10:36 PM UTC WinForms 2
loading
Tags: GridControl
Gert
Asked On May 3, 2007 07:57 AM UTC

Hi All,

I have following problem :

I need to print a list of barcodes using gridcontrol.
I use the font 3 of 9.
The problem is that when printing, all fonts inside cells are printed slightly smaller than then they should use to be.
Thus my barcodes are printed smaller and can not be read by the device. Increasing fontsize does't help. It seems that trough printing the font gets changed and de barcode gets unreadable.

Printing the barcode in the PrintPage event,
works fine.
e.Graphics.DrawString("*7622200161942*", new Font("3 of 9 Barcode", 18f), new SolidBrush(Color.Black), new PointF(50, 50));

The barcode printed in the 'PrintPage event' are ok and readable. The barcodes in gridcells are slightly smaller (same font,size,..) and won'twork


Any suggestions ?

thx
Gert

haneefm [Syncfusion]
Replied On May 3, 2007 06:26 PM UTC

Hi Gert,

Thank you for your update.

Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Best regards,
Haneef

haneefm [Syncfusion]
Replied On May 3, 2007 10:36 PM UTC

Hi Gert,

One way you can do this by handling the DrawCellDisplayText event and use e.Graphics.DrawString method to draw barcode in a grid cell. Please try the below code and let me know if this helps.

void gridControl1_DrawCellDisplayText(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellDisplayTextEventArgs e)
{
GridControl grid = sender as GridControl;
if (grid.PrintingMode)
{
e.Graphics.DrawString(e.DisplayText, new Font("3 of 9 Barcode", 18f), new SolidBrush(Color.Black), e.TextRectangle.Location);
e.Cancel = true;
}
}

Best regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;