Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When selecting Type EAN13 label only have 12 digits #38

Closed
andrenpt opened this issue Nov 16, 2017 · 6 comments
Closed

When selecting Type EAN13 label only have 12 digits #38

andrenpt opened this issue Nov 16, 2017 · 6 comments
Assignees
Labels

Comments

@andrenpt
Copy link

Hello,

When I generate a barcode of type EAN13 why is the label only displaying 12 digits ?

Thanks

@andrenpt
Copy link
Author

Hello again,

In order to replicate this issue you need to use this sizes (120,55):
var image = b.Encode(BarcodeLib.TYPE.EAN13, barcodeNumber, Color.Black, Color.White, 120, 55);

Thanks

@barnhill
Copy link
Owner

The default is to put the exact data you encoded into the label ... now if you wanted to put the encoded value you are able to do that or you can put whatever you want in the label. The check digit by default isnt put in the label. The label functionality is pretty generic and applies to all symbologies but Id be open to pull requests that include specific labeling for symbology types.

@barnhill barnhill self-assigned this Nov 18, 2017
@barnhill
Copy link
Owner

barnhill commented Apr 8, 2018

@andrenpt there is new functionality as of tonight to print EAN-13 labels in a more standard format. Im going to close this since that is in now.

@barnhill barnhill closed this as completed Apr 8, 2018
@barnhill
Copy link
Owner

barnhill commented Apr 8, 2018

ean-label

@AmineMessabhia
Copy link

AmineMessabhia commented Nov 1, 2019

Hey @barnhill,
First of all, you're awesome!! I found your library and I was soooo relieved i did.
I have version 2.2.2 of the library, but this is how my Barcode EAN-13 shows:

image

Also, here is my code for it:

`BarcodeLib.Barcode b = new BarcodeLib.Barcode("6132502917419", BarcodeLib.TYPE.EAN13);

b.IncludeLabel = true;

System.Drawing.Image img = b.Encode(BarcodeLib.TYPE.EAN13, "6132502917419", Color.Black, Color.White, 1160, 480);`

Can you please tell me what am i doing wrong? cuz i'm trying to get the first digit on the left of the first two lines.

Thank you very much!

@barnhill
Copy link
Owner

barnhill commented Nov 3, 2019

Im pretty sure I moved this below the starting lines. You would need to modify the label method for EAN13 if you want to move it back on the left side of the lines. Its going to require calculation of the width of the text since you have to start drawing the barcode on the right side of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants