Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Used iTextSharp third Party DLL to create the Barcode image

below code was developed in C# application.how to Implement on vc++ 6.0 mfc application

What I have tried:

Examples for C#:

private string GenerateBarCodeStringMFormat("M ",Name,age,address,city,pincode);
{

return BarCodeString;
}

public static byte[] generateBarCodeMFormat(string strBarCode) { iTextSharp.text.pdf.BarcodePDF417 barcode = new iTextSharp.text.pdf.BarcodePDF417();

barcode.SetText(strBarCode); System.Drawing.Image img = barcode.CreateDrawingImage(Color.Black, Color.White);

MemoryStream ms = new MemoryStream(); img.Save(ms, System.Drawing.Imaging.ImageFormat.Gif); byte[] m_Bytes = ms.ToArray(); return m_Bytes;

}
Posted
Updated 15-Mar-18 1:44am

See your original question at VC++ 6.0 MFC how to generate 2D barcode 128[^]. Additionally, drawing bars on a screen or printer is not difficult using Windows GDI[^].
 
Share this answer
 
You can't because iTextSharp is a managed .Net DLL that can't be used with C++. All you can do is using managed C++/CLI which requires a newer VisualStudio version.
 
Share this answer
 
Comments
Member 12773184 16-Mar-18 8:15am    
Is it possible for visual studio 2005?
Jochen Arndt 16-Mar-18 8:20am    
C++/CLI has been introduced with Visual Studio 2005. But I highly recommend to use a newer version to benefit from the recent .Net versions (the old ones are no longer supported).

Note also that C++/CLI differs from "normal" C++ and can't be learned in a few days.
Member 12773184 16-Mar-18 8:28am    
please suggest which version to use?
Jochen Arndt 16-Mar-18 8:50am    
The freshest version: 2017.

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