Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners. This site chose the Norton Secured Seal to promote trust online with consumers. IDAutomation.com, Inc., Computers Hardware, Software & Services, Tampa, FL View your cart in the IDAutomation Store
       
Menu

Home > Barcode Components > Native Barcode for OpenOffice > User Manual

Native Barcode Generator for LibreOffice & OpenOffice Manual

Order Native OpenOffice Barcode Generator Download Demo of Native OpenOffice Barcode Generator Forum support for OpenOffice Generator

NOTE: This product supports LibreOffice Version 5 by The Document Foundation and Apache OpenOffice version 4 and should also work with other versions that provide VB Macro capability.

Legal Notice: This product is protected by US Patent 7,637,436 B1. Files containing this technology may only be distributed outside the licensed organization with the purchase of a Developer License to the Native Barcode Generator.

Product Overview

The Native Barcode Generator is a custom VB macro module that may be easily inserted into LibreOffice and OpenOffice to generate barcode images without any custom fonts, DLLs or external dependencies. It is the complete barcode generator that stays embedded, even when distributed.

Calc Installation

Within this tutorial, Calc is used as the database that performs the native barcode generation. After Calc is setup in this way, barcodes may be easily generated within cells, or even entire rows or columns. As demonstrated in this tutorial, other applications may use Calc as the data source to display fields and barcodes. Other OpenOffice applications may also generate barcodes without Calc, if they are able to call the VB function and return the barcode, which is generated in Unicode UTF-16 format.

  1. Extract the files from the Native Barcode Generator package. An example is included and may be used for implementation or testing purposes.
  2. Open the spreadsheet that will contain the barcodes.
  3. Verify the Macro Security Level is set to Medium, which gives the user the option to confirm if a macro is able to run. To verify this setting, choose Tools - Options - Security - Macro Security and to confirm the level is set to Medium and choose OK.
  4. Choose Tools - Macros - Organize Macros - OpenOffice.org Basic/LibreOffice Basic.
  5. In the 'Macro from' area, click on the name of the desired file and choose New. This will embed the macros and Visual Basic source code into the file.
  6. Remove the 'Sub Main' and 'End Sub' text that are automatically added.
  7. Click on the 'Insert Basic Source' button and choose the .bas file that represents the barcode type that is needed.

    This will automatically add the code into the editor window.
  8. Choose File - Save and File - Exit to exit the VB editor.
  9. Create an area in the spreadsheet column for the barcode. Size the column to make sure it is wide enough to contain the entire barcode. Format the column so that any text appearing in it will be centered. This is necessary to create the white space (often called the quiet zone) before and after the barcode.
  10. If the spreadsheet is going to be used as a data source for another application, row 1 must contain the title of the fields as shown in the image below.
  11. In the cell where the barcode is needed, select the "Courier New" font (or any other Unicode UTF-16 compliant mono-spaced font such as "Lucida Console") and change the point size to 4. If the dialog does not contain this small size, it must be manually entered.
  12. Enter the formula in the cell where the barcode is needed. For example: To generate a Code-128 symbol in cell B2 from data in cell A2, the formula in cell B2 would be =IDAutomation_NatG_C128(A2):
      
    To generate a Data Matrix symbol, the formula would be =IDAutomation_NatG_DataMatrix(A2) :
     DataMatrix symbol generation in cell B2
  13. Optional parameters may be changed if necessary.
    • For linear barcodes only, when changing the "BarHeight" variable, the size of the cell must also be increased so that taller barcodes may be contained. The approximate height is determined by the following formula:
        Height in Inches = (Font Size) * (BarHeight) * 0.015
        Height in CM    = (Font Size) * (BarHeight) * 0.04

      The default BarHeight is 6.
    • If it is necessary to change the X dimension or barcode width, highlight the barcode field and change the font point size. The point size must be small, generally 3 or 4 points. If the size drop down box does not contain these small sizes, they must be manually typed in. The font selected for the cell must be "Courier New" or another mono-spaced Unicode font.

      Point Size

      Approximate X Dimension

      2 08 Mils
      3 12 Mils
      4 16 Mils
      5 20 Mils
      6 24 Mils
      7 28 Mils
      8 32 Mils
  14. To create barcodes for other cells in the column, select the original cell, choose Edit - Copy, select the new cell or cells and choose Edit - Paste.
  15. Close the spreadsheet and reopen it to ensure the barcodes are properly generated.
  16. Disable AutoCalculate by choosing Tools - Cell Contents - AutoCalculate.
    This is necessary if:
    (1) the spreadsheet will be used as the data source for another application such as Writer or Base;
    (2) the spreadsheet takes too much time to recalculate when it is first opened; or
    (3) if many 2D barcodes are being generated.

    Every time the spreadsheet is modified, choose Tools - Cell Contents - Recalculate (or F9) to ensure accuracy within the spreadsheet.
  17. It is normal to view some distortion such as lines within the symbol because of low screen resolution. However, the barcodes will be accurate when printed.
  18. If a scanner is needed to verify barcodes, IDAutomation offers several affordable, barcode scanner kits including plug-and-play USB scanners.

Writer Mail Merge

Within this mail merge tutorial, Calc is used as the database that performs the native barcode generation.

  1. After the Calc Installation is complete, verify AutoCalculate is disabled.
  2. Open the Writer document for the Mail Merge.
  3. Choose Tools - Mail Merge Wizard. Follow the standard process to start the merge.
  4. On the Insert Address Block screen of Step 3, click "Select Address List" and select the Calc spreadsheet that contains the barcodes.
  5. After the data source is selected, choose Insert - Fields - Other and insert the fields into the document where they are needed. The native barcode field should be contained in a table that is large enough to contain the entire symbol. In this example, a table of 1 row and 2 columns was created.
    Writer mail merge field placement exampleSelecting mail merge fields
  6. Select the field that will contain the barcode and change the font to Courier New and change the point size accordingly. Because the point sizes are so small, they must be manually typed in.
  7. Choose Tools - Mail Merge Wizard - Edit Document and verify the barcode shows properly.
  8. Follow the standard process to complete the merge as necessary.

Parameters

Below is a list of the symbologies and the parameters associated. All parameters are optional except DataToEncode.

Barcode Macros Functions & Parameters
Code-39 IDAutomation_NatG_C39(DataToEncode; BarHeight; N_Dimension; IncludeCheckDigit)
Example: IDAutomation_NatG_C39("12345678";8;2;1)
Codabar IDAutomation_NatG_Codabar(DataToEncode; BarHeight; N_Dimension; CodabarStart; CodabarStop)
Code-128 | GS1-128 IDAutomation_NatG_C128(DataToEncode; BarHeight; ApplyTilde)
Example: IDAutomation_NatG_C128("123456789012";10;0)
Code 128 A IDAutomation_NatG_C128a(DataToEncode; BarHeight)
Example: IDAutomation_NatG_C128a("1234567890";12)
Code 128 B IDAutomation_NatG_C128b(DataToEncode; BarHeight)
Code 128 C IDAutomation_NatG_C128c(DataToEncode; BarHeight)
Interleaved 2-of-5 IDAutomation_NatG_I2of5(DataToEncode; BarHeight; N_Dimension; IncludeCheckDigit)
MSI IDAutomation_NatG_MSI(DataToEncode; BarHeight; N_Dimension; IncludeCheckDigit)
Data Matrix | GS1-DataMatrix IDAutomation_NatG_DataMatrix(DataToEncode; ApplyTilde; EncodingMode; PreferredFormat)
Example: IDAutomation_NatG_DataMatrix("123456789012";1;0;27)
GS1 Example: IDAutomation_NatG_DataMatrix("(00)008012349999999997")
USPS Postnet * IDAutomation_NatG_Postnet(DataToEncode; IncludeCheckDigit)
Text Macros Functions & Parameters
Code 128 Text IDAutomation_NatG_C128HR(DataToEncode; ApplyTilde)
Splice Text IDAutomation_NatG_SpliceText(DataToEncode; SpacingNumber; ApplyTilde)
Property Definitions:
2D Specific:

* If these symbologies are needed, IDAutomation can usually create this product within 3-10 working days with the purchase of the applicable Linear or Linear + 2D Unlimited Developer License. Contact IDAutomation support before purchase for verification of specific requirements.

Technical Support

Forum support for OpenOffice Generator
 

Free product support may be obtained by reviewing the knowledgebase articles that are documented below and by searching resolved public forum threads. Priority phone, email and forum support is also provided within 30 days of purchase. Additional phone, email and forum support is provided with an active Priority Support and Upgrade Subscription.

Common Problems and Solutions:

  • If scanning problems are encountered, verify a printer of 600 DPI or greater is being utilized. A large point size such as 5 points must be used with low resolution printers. IDAutomation also offers many barcode fonts that print well to low resolution printers.
  • The font selected for the object should be "Courier New," "Lucida Console" or other mono-spaced Unicode font.
  • If several small question marks appear instead of a barcode when creating a PDF for performing other conversions of the report, it is an indication that the component performing the conversion is not Unicode compliant. In this situation, contact the component vendor to obtain an updated or Unicode compliant version.
  • In the event white lines appear in the barcode, highlight the object and choose Format - Field - Paragraph. Adjust the line spacing to the largest size that eliminates white lines in the symbol. Generally, the setting of 0.8 to 0.95 is used for the "Courier New" font.
  • 2D Generators provided may generate slowly because of the complex algorithms used in these symbologies. IDAutomation recommends encoding 50 characters or less when using these symbologies. More data may be encoded, although the report may take longer to generate.
Popular Forum Post Resolutions:

Back to Top

 ©Copyright 2016 IDAutomation.com, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Loading
Training Videos on YouTube  Join us on Google Plus  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.