Click here to Skip to main content
15,891,684 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dears,
we can create empty barcode in bartender to use it in the application, we load the file, get the barcode then change its value:
C#
private BarTender.Application GetApplication() {
if (barTenderApplication == null) {
barTenderApplication = new BarTender.Application();
    }
return barTenderApplication;
}
 
Format barTenderFormat = GetApplication().Formats.Open(fileName);
barTenderFormat.SetNamedSubStringValue("gh", txtFName.barTenderFormat.SetNamedSubStringValue("os", txtX.barTenderFormat.SetNamedSubStringValue("yo", txtY.Text);
string imageName = @"C:\Bartender 03.10.13\" + DateTime.Now.Millisecond + ".jpg";
barTenderFormat.ExportToFile(imageName, "jpg", BtColors.btColors16, BtResolution.btResolutionPrinter, BtSaveOptions.btSaveChanges);
barTenderFormat.Close(BtSaveOptions.btSaveChanges);
Bitmap bMap = new Bitmap(new Bitmap(imageName), pictureBox.Width, pictureBox.Height);
pictureBox.Image = bMap;

but the question is: how to create the whole file from scratch,and create the objects inside it (barcode, text and other objects in this file) and set its value.
And if we create the file from bartender so how can we generate barcode, objects and set its value
Posted
Updated 3-Oct-13 20:45pm
v3
Comments
Cool Smith 24-Dec-17 11:30am    
Hello,
Pls how are you doing the above, i need the same solution to print in my software?
Regards

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900