Ben
|
Best Answer
-INSTALLATION-
Install all required applications and components for Word and BI Publisher.
1. Download the demo or purchased version of the 1D barcode fonts package.
2. Extract the file and run the installer OR manually install the fonts by referring to your OS instructions for installing a font.
-SET UP JAVA CLASS-
3. Download the Java Font Encoder Class demo or extract the encoder from the Developer Tools download from the store purchase.
4. Locate the IDAutomation_LinearJavaFontEncoder.jar and set up the file in your environment.
NOTE: Prior to implementing the solution in BI Publisher, confirm that you can create a Linear/1D barcode in a stand alone application/project. If not, ensure that the jar file is part of the classpath within your Environment Variables.
-CREATE BARCODEUTIL.CLASS-
5. Download the IDAutomation_BIPublisher_Linear.zip (for Universal Fonts download IDAutomation_BIPublisher_Linear.zip) . It includes the barcodeutilLinear.java (Universal - barcodeutilUni.java) and dependencies (Logger.class and XDOBarcodeEncoder.class) for creating the barcodeutil class.
6. The Encoder section of the tutorial provides an example of the parameters. Update the parameters in the .java file based on the barcode requirements:
Linear
/* Import the idautomation encoder class */
import com.idautomation.*;
LinearFontEncoder FontEncoder = new LinearFontEncoder();
return FontEncoder.Code128(DataToEncode);
Class[] clazz = new Class[] { "".getClass() };
ENCODERS.put("linearbarcode",mUtility.getClass().getMethod("linearbarcode", clazz));
Universal:
/* Import the idautomation encoder class */
import com.idautomation.universalencoder.*;
Universal UniFontEncoder = new Universal();
return UniFontEncoder.IDAutomation_Universal_C128(DataToEncode);
Class[] clazz = new Class[] { "".getClass() };
ENCODERS.put("unibarcode" , mUtility.getClass().getMethod("unibarcode" , clazz));
7. Compile the barcodeutilLinear.java file to create a new class named barcodeutilLinear.class
-SET UP JAR FILES-
8. Access the jlib path and place the following jar files in the classpath: xdocore.jar, xmlparserv2.jar, collections.jar, aolj.jar, share.jar, xdoparser.jar, jewt4.jar, 18nAPI_v3.jar.
9. Place the barcodeutilLinear.class/barcodeutilUni.class into a new jar named barcodejar.jar.
10. Copy the IDAutomation_LinearJavaFontEncoder.jar and the barcodejar.jar to the jlib folder within the Template Builder for Word.
11. So that BI Publisher can find the wrapper class, all the jars required for the project must be put into the RTF2PDF.jar which is located in the jlib folder.
12. Make a back up of the RTF2PDF.jar file.
13. Open the RTF2PDF.jar using Winzip or 7-zip and access the META-INF directory. Open and edit the MANIFEST.MF to include the jars at the end of the classpath list:
Manifest-Version: 1.0
Class-Path: ./activation.jar ./mail.jar ./xdochartstyles.jar ./bicmn.jar ./jewt4.jar
./share.jar ./bipres.jar ./xdoparser.jar ./xdocore.jar ./xmlparserv2.jar
./xmlparserv2-904.jar ./i18nAPI_v3.jar ./versioninfo.jar
./barcodejar.jar ./IDAutomation_LinearJavaFontEncoder.jar
Main-Class: RTF2PDF
-SET UP TO RENDER BARCODE-
14. In order to render the barcode in a PDF report, it must be embedded by referencing the font within a config file in the BI Publisher config folder. Open the xdo example.cfg file located:
15. Add a font entry for the IDAutomationC128L.ttf. (or other IDAutomation font used).

16. Return to Word and access the BI Publisher file. Double-click the field to barcode and choose Add Help Text to open the Form Field.
17. In the Status Bar tab, enter the first command:
<?register-barcode-vendor:'ENCODER WRAPPER CLASS'; 'ENCODER NAME'?>
18. In the Help Key (F1), enter the second command:
<?format-barcode:DATA_TO_ENCODE;'ENCODER_METHOD_NAME';'ENCODER_NAME'?>
19. To ensure the data is encoded, view the document (PDF,RTF,HTML):

20. Return to the project and select the IDAutomationC128L font from the font list. View the document.
Posted 2.6 year(s) ago
|