how to generate data to Data Matrix Code & PDF147?

julkifli33
Member Posts: 1,092
Hi All,
i want to print label as data matrix code and pdf147
are we able to do that in NAV?
by the way i am using nav 2015
Thanks
i want to print label as data matrix code and pdf147
are we able to do that in NAV?
by the way i am using nav 2015
Thanks
0
Best Answer
-
Hi.
You can use DataMatrix component to generate barcode: http://datamatrixnet.sourceforge.net/
Here is example from Nav 2017, this function returns bmp-image in TempBlob record:PROCEDURE Create2DBarcode(Text2Encode : Text[250];pxWidth : Integer;pxHeight : Integer;VAR TempBlob : TEMPORARY Record 99008535); VAR DataMatrix : DotNet "'DataMatrix.net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.DataMatrix.net.DmtxImageEncoder"; Image : DotNet "'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.System.Drawing.Image"; Bitmap : DotNet "'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.System.Drawing.Bitmap"; BEGIN FileNameBmp := FileManagement.ServerTempFileName('bmp'); DataMatrix := DataMatrix.DmtxImageEncoder; Image := DataMatrix.EncodeImage(Text2Encode); Bitmap := Bitmap.Bitmap(Image, pxWidth, pxHeight); Bitmap.Save(FileNameBmp); CLEAR(TempBlob); IF TempBlob.INSERT THEN; FileManagement.BLOBImportFromServerFile(TempBlob, FileNameBmp); TempBlob.MODIFY; END;
5
Answers
-
PDF147
Data Matrix Code
0 -
Hi.
You can use DataMatrix component to generate barcode: http://datamatrixnet.sourceforge.net/
Here is example from Nav 2017, this function returns bmp-image in TempBlob record:PROCEDURE Create2DBarcode(Text2Encode : Text[250];pxWidth : Integer;pxHeight : Integer;VAR TempBlob : TEMPORARY Record 99008535); VAR DataMatrix : DotNet "'DataMatrix.net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.DataMatrix.net.DmtxImageEncoder"; Image : DotNet "'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.System.Drawing.Image"; Bitmap : DotNet "'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.System.Drawing.Bitmap"; BEGIN FileNameBmp := FileManagement.ServerTempFileName('bmp'); DataMatrix := DataMatrix.DmtxImageEncoder; Image := DataMatrix.EncodeImage(Text2Encode); Bitmap := Bitmap.Bitmap(Image, pxWidth, pxHeight); Bitmap.Save(FileNameBmp); CLEAR(TempBlob); IF TempBlob.INSERT THEN; FileManagement.BLOBImportFromServerFile(TempBlob, FileNameBmp); TempBlob.MODIFY; END;
5 -
Hi Alex, thanks for your reply
i got the solution using Zxing
Thanks anyway0 -
Hi, we use Dynamics NAV 2013, I'm trying to get a DataMatrix barcode generated. I've downloaded the DataMatrix.net.dll from sourceforge and placed it in the Add Ins folder on my client, and registered it using RegAsm. When I try to declare a variable in the development environment as a dot net I can see DataMatrix.net but after selecting that I cannot see DmtxImageEncoder, just an error message "cannot load type ''.".
What have I missed?
Life is for enjoying ... if you find yourself frowning you're doing something wrong0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions