Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > How can I create and print GS1-128 barcode in 1C:Enterprise?

Forum

Search UsersRules
How can I create and print GS1-128 barcode in 1C:Enterprise?
#1
Just came
Points:: 0
Joined:: Sep 27, 2013

How can I create and print GS1-128 barcode in 1C:Enterprise?

Profile
#2
Just came
Points:: 0
Joined:: Sep 27, 2013

found a topic.
this

Quote
For example:
Area.Drawings.EAN.Object.CodeValue = "1234567890128";
works for simple numeric tipes of barcode.
and what to do with GS1-128 (EAN-128), which contains AIs, for example: (240)0007915501(11)130930(17)131020(3103)001275
give an example of code please.

Profile
#3
Just came
Points:: 0
Joined:: Sep 27, 2013

works this way:

Code
Area.Drawings.EAN.Object.CodeValue = "(240)0007915501(11)130930(17)131020(3103)001275";



next question.
scanning of this code gives the string "240000791550111130930171310203103001275" as result.

The decryption of this string uses standard http://en.wikipedia.org/wiki/GS1-128
Some AIs have variable lengths, for example AI 240.
the end of the data marks with the character FNC1 = ASCII 29.

inserting the ASCII 29 character to the barcode leads to the appearance of a space in the barcode - see the picture
Code:
Code
Area.Drawings.EAN.Object.CodeValue = "(240)0007915501" + Char(29) + "(11)130930(17)131020(3103)001275";


how to delete this space?

FNC1 character must not be displayed. codes generated by other programs  print normally.

one more time: the task is to add FNC1 character to the barcode, but do not print it (FNC1)

Profile
#4
Guest
Points::
Joined::

Hello, Mikhail!
The problem with this space is fixed in new version 8.2.1.5 of barcode print component. Please see the attached file.

Profile
#5
Just came
Points:: 0
Joined:: Sep 5, 2014

Hi Timofey!
How to use BarcodePrintComponent.zip that you show above.

Thanks and best regards!
Huong Tram

Profile
#6
Guest
Points::
Joined::

Hello, Huong Tram!

You can find examples of using components in Managed application demo and in 1C:Small Business.

If being short, you need to add it as a common template, then attach as an add-in and then use by calling methods of it.

Code
ConnectionCompleted = AttachAddIn("CommonTemplate.BarcodePrintingComponent", 
         "BarCodePicture", AddInType.Native);
   
If ConnectionCompleted Then
   ExternalComponent = New("AddIn.BarCodePicture.Barcode");
Else
   Return Undefined;
EndIf;
ExternalComponent.CodeValue = Barcode;
SpreadsheetDocumentArea.Picture = ExternalComponent.GetBarcode();

Profile
#7
Just came
Points:: 0
Joined:: Sep 5, 2014

Hi Timofey!
I used regsvr32  to load 1CBarCodWin64_8_2_1_5.dll but that was error: " The module 1CBarCodWin64_8_2_1_5.dll was loaded but the entry-point DllRegisterServer was not found."


Pls help me

Profile
#8
Active user
Points:: 0
Joined:: Jun 25, 2013

You should import 1CBarCodWin64_8_2_1_5.dll to your configuration as a common template.

Start your application in Designer, expand the configuration tree, add a new template, name it as you want to call it in the script (in the Timofey's example the template name is BarcodePrintingComponent), double-click the template in the tree and click Restore from file. Then select the dll file and click OK.

In the picture below you can see an example from 1C:Small Business

Profile
#9
Just came
Points:: 0
Joined:: Sep 5, 2014

Thanks you very much!

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.