1C Barcode printing control

Discussing the best practices of 1C:Enterprise implementation, sharing the business-level of 1C:Enterprise implementation experience.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

Hallo,
i want to use the 1C Barcode printing control in my application but the control is in russian. Has anybody an idea to change it to english?

My problem is, i have to print an Code128 Barcode on my document. The Barcode ha over 50 characters. the barcode must printed only on the width of 13 cm.. With this width, i have a blank Control. Where can i tell 1C to fit the barcode in this field?

Thanks for your answers.

 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can see some examples in 1C:Small Business. See Setup and Administration -> Connected Equipment. Note that Setup and Administration -> Service Functions Settings -> Use External Equipment must be checked.

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 5, 2012
Company: 1C Company

Hi!
The 1C Barcode component has russian installation module (setup.exe). Unfortunately there is no other language available for installation program. Actually, you can use the barcode component 1CBarCod.dll without the installation program, because it is a standard COM component. It can be installed either by regsvr32.exe or automatically by loading the DLL by platform itself. For both possible operations administration privileges and elevation are required. The syntax of regsvr32.exe call is simple: regsvr32.exe 1CBarCod.dll

The 1C Barcode component itself is an international component and has two internal methods implementation (en and ru). It can be used in international applications without limitations.

The 1C Barcode produces barcode which fits automatically. Each time the component field expands, the thickness of bars adjusted automatically to fit the field. For each type of barcode there is the minimal thickness of one vertical bar. Based on the minimal thickness the barcode component calculates the minimal width of place required to draw a barcode. If available width of component field is not enough to draw a barcode with minimal width - then only blank space appears. Simply try to make a field larger and you'll see that drawing appears.

In practice, the canvas resolution of display and printer are differs. The display usually has only 96 DPI, and the printer usually has 300 DPI and more. That means, the barcode component which can't be showed on the display preview, can be though normally printed. You can try to make some test changing the size of barcode field and print it with current printer resolution. Then you'll find a minimal size of barcode which can't be shown in a print form on screen, although can be normally printed.

The second way to put more information in the same place is to choose a barcode type with a minimal thickness of bar (yes, they are differs!) So the minimal bar from the commonly used barcodes has a Code128 subversion "B". This subversion has a suitable character table and besides it is very compact. Note, that subversion "A" and "C" taking more place then "B".

In my experience in enterprise solutions, I highly NOT recommend to put 50 characters in the same barcode. The really good readable by the laser (the CCD is not suitable) scanners - barcode length is ~100 mm and shorter. And in practice you can put in it max 20-25 characters.

The possible solutions:
- Divide the barcode on the 2 or more parts, and insert in data IDs of each part of barcode to identify properly scanned data.
- Use 2D barcodes (and 2D scanners). Which barcode type to use, depends on available scanners you can use. My recommendation: PDF417 or Aztec.

 
#4
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

Hallo Andrey,
thank you for your answer.
i have testet all what you write, but i only become the russian interface. in 1C if i right-click the barcode-component then i get an application hang and 1C crash.
Now i have tested another Barcode-Component called <deleted as ad> and it is great. All what i want works. Also PDF417.

 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 5, 2012
Company: 1C Company

Actually i've accessed the 1C Barcode component using API only and it's working fine.

For example:
Area.Drawings.EAN.Object.CodeValue = "1234567890128";

Here:
- Area - is area cells of table document;
- Drawings - is a collection of attached drawings;
- EAN - is a name of drawing containg ActiveX object;
- Object - is drawing property referencing 1C Barcode object;
- CodeValue - 1C Barcode property containing text for constructing the barcode.

 
#6
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

Hallo Andrey,
yes that works fine but, i must print a NVE-Barcode. This is an Code128. The Codevalue eg is:
(02)4000000000000(11)120801(37)000800(10)42653

The max. width of the drawings is 12,5 cm and high is 3,5 cm.

If i do the, the barcode does not fit in this drawing feld and is blank. Than all descriptions on the property page of 1C Barcode in Designer mode are in Russian language an i do not understand Russian.

 
#7
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 5, 2012
Company: 1C Company

Here is an API of 1C Barcode.

Primary properties:
- Barcode type: CodeType
(0 = EAN8
1 = EAN13 (default)
2 = EAN128
3 = CODE39
4 = CODE128
5 = CODE16K
6 = PDF 417 (2D)
7 = Industrial 2 of 5
8 = Interleaved 2 of 5
9 = ASCII-extension CODE39
10 = CODE93
11 = ITF14
12 = RSS 14
13 = CodaBar
14 = EAN13 AddOn 2
15 = EAN13 AddOn 5)
- Barcode type autodetection: CodeAuto (True / False (default))
- Barcode message has a raw format (contain control char):CodeIsRaw (True / False (default))
- Barcode check symbol visibility: CodeShowCS (True (default) / False)
- A text message to be encoded: CodeValue (String)
- Calculated barcode check symbol: CodeCheckSymbol (Char)
- Text string, printed on (usually below) the barcode: CodeText (String)
- Height of delimiter bars in % to normal bars (for EAN13, EAN8): CodeSentinel (default: 10)
- Calculated minimal width of barcode in mm: CodeMinWidth (Numeric)
- Calculated minimal height of barcode in mm: CodeMinHeight (Numeric)
- Barcode column count (for PDF417): ColumnCount (Numeric: 0=auto,default, 1-30)
- Barcode row count (for PDF417): RowCount (Numeric: 0=auto,default, 1-30)
- Barcode aspect ratio (PDF 417): AspectRatio (String in format: “X:Y”, default: “1:4”)
- Error correction level  (for PDF417): ECL  (Numeric: 0(default)-8)

Appearance properties:
- Barcode font: Font (COMObject), see methods below
- Barcode text color: TextColor (Numeric = R * 256 * 256 + G * 256 + B, default 0 = black)
- Barcode text alignment: TextAlign (Numeric: 0-6)
- Barcode text position: TextPosition (0 = Bottom (default) / 1 = Top)
- Barcode text visibility: TextVisible (True (default) / False)
- Barcode background color: BgColor (Numeric = R * 256 * 256 + G * 256 + B, default: 16777215 = white)
- Barcode background transparency: BgTransparent (True / False (default))
- Barcode bar color: BarColor  (Numeric = R * 256 * 256 + G * 256 + B, default 0 = black)
- Barcode canvas rotation angle: CanvasRotation (0 (default), 90, 180, 270)
- Barcode canvas horizontal offset, mm: CanvasXOffset (Numeric: default 0)
- Barcode canvas vertical offset, mm: CanvasYOffset (Numeric: default 0)
- Barcode canvas margin size, mm: CanvasMargin  (Numeric: default 0)
- Barcode alignment: BarAlign (0 – w/o alignment (use horizontal offset), 1 – left, 2 – center (default), 3 – right)

Appearance methods:
- Set text color: SetTextColor(Red, Green, Blue) – sets color by the components RGB in range 0-255
- Set bar color: SetBarColor(Red, Green, Blue) – sets color by the components RGB in range 0-255
- Set background color: SetBgColor(Red, Green, Blue) – sets color by the components RGB in range 0-255
- Set font: SetFont(FontName, FontSize, FontWeight, Italic, Strikethrough, Underline) – sets font for barcode text. Example: SetFont("Arial", 10, 400, True, False, False)

 
#8
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 5, 2012
Company: 1C Company

Check also the version of control. The latest available is 8.0.14.2

 
#9
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

Thank you Andrey for you geat an complete description of the barcode component.

normaly all works, but for the NVE Code i can not use this component because it don't fit the barcode in the region of 12,5 x 3,5 cm.

i use the version 8.0.14.2 of the Barcode component.

 
#10
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 5, 2012
Company: 1C Company

You can use a Printer with higher resolution. Remember, that even if your barcode is not displayed on the screen, it still be possible to print it out. I think, that in worst case you'll need a printer with 1200 DPI, which is 12.5 times more then usual screen resolution of 96 DPI. The question is, which scanner will be able to read such compressed barcode, but this is not related to 1C Barcode itself.

 
#11
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jul 16, 2015
Company:

How install 1cbarcode or analog to linux rpm based ?
I want print barcode ? but it  problem on something reports.

 
#12
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Ruslan.

Please see an example in Managed application demo, it includes both Windows and Linux versions of the Barcode printing component.

 
#13
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Mar 12, 2012
Company:

Help me please find 1cbarcode exe 8 2!

 
#14
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear truc nguyen,

By using the Managed application demo, in Designer, you can export the Barcode printing component to a DLL file.

In your application, you can include the Barcode printing component by importing the DLL and then use the component in your code similar to the way it is used in the Managed application demo.

Best regards,
Vladimir Gurov

1C Company support team
 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.