• No results found

Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12

N/A
N/A
Protected

Academic year: 2021

Share "Komumaldata Barcoded PDF Forms PDF417 Barcode Generator Reference XFA (LiveCycle) Version Generator Version: 1.12"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

Komumaldata Barcoded PDF Forms

PDF417 Barcode Generator Reference

XFA (LiveCycle) Version

(2)

Table of contents

PDF417 Barcode Structure...3

Generator Function ...3

Text Encoding Object ...4

Examples ...5

Embending Javascript ...5

(3)

PDF417 Barcode Generator Reference

PDF417 Barcode Structure

Generator Function

Description

Calling the Komdat_GeneratePDF417() function will generate the barcode symbol. Note that the function does not correct invalid parameter values, thus, you must supply valid parameters!

Important technical informations are detailed in the descriptions of the parameters, except for barcode symbol coloring. Barcode graphic colors are hard-coded as black-white, and should not be changed. Colored barcodes can be read too, because all barcode readers are „colorblind” and analize contrast. This also explains why the black-white pair is the most safe combination to use.

Parameters

1. Input Data:

• Must be an array, containing single byte elements, wich are the character codes of the data to encode.

2. Error Correction Level:

• There are a total of nine error detection/correction levels available, from zero to eight.

• Encoding with a correction level of zero does not mean that there are no error detection/correction codewords.

• Higher level means larger symbol size, longer calculation time, higher chance of detecting and correcting an error.

3. Number of Columns:

• The number of data columns can be fixed by giving an integer of a value between and including one and thirty.

• The generator algorithm calculates the optimal number of data columns automatically, if the value of the parameter is zero.

4. Number of Rows:

• The number of rows can be fixed by giving an integer of a value between and including three and ninety.

• The generator algorithm calculates the optimal number of rows automatically, if the value of the parameter is zero.

(4)

• If booth the number of data columns and rows are specified, the given number of rows is ignored, and the needed row count is calculated.

5. Container Object Reference:

• The container for the barcode symbol is an image field object, wich displays the symbol as a raster graphic bitmap. Note that XFA (LiveCycle) forms do not support vector graphics at all.

• Must be a string containing a valid reference to an image field object, wich is obtained using the resolveNode() function.

6. Quiet Zone Size:

• The minimum suggested size of the quiet zone is two times the size of the X dimension. The size of the X dimension is one unit.

• There is no need for a quiet zone, if the barcode is not surrounded with text, graphic or different background.

7. Y Dimension Size:

• The size of the Y dimension, given in units. The suggested size of the y dimension is 3 times the size of the X dimension.

• Must be between and including two and five.

8. Scale:

• The width and height of the barcode symbol container are multiplied with this value to scale the symbol.

• The sizing of the barcode symbol depends on booth the parameter values of the generator and the configuration of the container object. The generator only changes the size, any other setting of the container object must be configured manually. This is because we wanted developers to have more option displaying the barcode symbol.

• In static LiveCycle forms objects can not be resized dynamicly (that is why the form is called static), therefore resizing the symbol in static forms is not possible.

9. Maximum Symbol Width: 10. Maximum Symbol Height:

• These parameters specify the maximum size of the container object that displays the barcode symbol. This ensures that the generated symbol will not take more place than it should.

• Giving zero as the value of these parameters means there is no size restriction.

• The value is measured in inches, for compatibility with LiveCycle designer.

11. No Symbol Sizing:

• When set to true, it turns automatic sizing off.

• This affects the following parameters:

ƒ Scale

ƒ Maximum Symbol Width

ƒ Maximum Symbol Height

Throws

• „Symbol too large!” error if the encoded data takes more than 925 data codewords.

Text Encoding Object

Description

This object provides functionality for converting codetable on a PDF internal string. All functions have one single parameter, wich is an internal string, and all of them return with an array of byte wide integer numbers. The array returned by these functions can be supplied as the input data parameter of the generator function without any further conversion needed.

Note that the barcode encoding and decoding system must be set to the same character encoding to maintain integrity of the carried data. Characters that are not present in the choosen codetable are replaced with a non-breaking space.

Functions

• objEncoding.Uni_To_8859_1(string) - Converts to iso-8859-1 codetable.

• objEncoding.Uni_To_8859_2(string) - Converts to iso-8859-2 codetable.

• objEncoding.Uni_To_8859_5(string) - Converts to iso-8859-5 codetable.

• objEncoding.Uni_To_8859_6(string) - Converts to iso-8859-6 codetable.

• objEncoding.Uni_To_8859_7(string) - Converts to iso-8859-7 codetable.

• objEncoding.Uni_To_8859_8(string) - Converts to iso-8859-8 codetable.

(5)

PDF417 Barcode Generator Reference

• objEncoding.Uni_To_8859_16(string) - Converts to iso-8859-16 codetable.

• objEncoding.Uni_Encode(string) - Breaks up large character codes to unicode byte sequences.

Examples

Running the generator script

Step 1:

Get the data to encode, wich is the string value of a text field object in this example.

Step 2:

Convert the string to an array of byte wide integers, wich are character codes from a specified codetable.

Step 3:

Generate the barcode symbol.

Advice:

We advise you to put the barcode generator function call into a try block. An exception is thrown:

• When the encoded data size exceeds 925 data codewords, wich is the maximum specified in the PDF417 standard.

• When an invalid parameter value causes an error. (There is no parameter validation!)

The generator is tested and working, and will not encounter any error other than too much input data, if the parameter values are valid.

Do not forget, that you must reference the functions through the scripting object, that contains them! Step 1

var TextData = new String(form1.page1.TextInputField.rawValue); var ChrBlock = EncodingFunctions.objEncoding.Uni_To_8859_1(TextData);

Configuring the barcode symbol

Example 1:

How to make a barcode symbol wich resizes automatically, proportionally and uses a zoom multiplier?

• Set the sizing property of the image field object to „scale image proportionally”.

• Turn on automatic sizing by setting the „no symbol sizing” parameter of the generator function call to „false”.

• Set the parameters of the automatic sizing.

Example 2:

How to make a barcode symbol wich always takes the same size independent from the ammout of the carried data?

• Set the sizing property of the image field object to „scale image to fit rectangle”.

• Turn off automatic sizing by setting the „no symbol sizing” parameter of the generator function call to „true”. Note that this might corrupt your barcode symbol, if the width to height ratio of the image field differs greatly from the generated picture’s. This can be corrected by fixing the number of data columns or rows.

Embending Javascript

To embend the generator code in your LiveCycle PDF form, follow these steps:

• Open your document with LiveCycle designer.

• Right click the form in the hierarchy veiw, and select „Insert Script Object” form the dropdown menu.

• Name the new scripting object as „KomdatBarcodeGenerator”.

• Select the scripting object, and open up a script editor window (Ctrl+Shift+F5).

• Copy the contents of the „Komdat_PDF417_XFA.txt” provided in the package, into the scripting object.

• Add an other scripting object, and name it „EncodingFunctions”.

• Copy the contents of the „EncodingFunctions.txt” into the scripting object.

• Create and configure the image field that will display the barcode. (See examples section.)

• Call the functions to generate the barcode. (See examples section.)

Step 2

try {

KomdatBarcodeGenerator.Komdat_GeneratePDF417(ChrBlock, 2, 0, 0,

"xfa.form.form1.page1.BarcodeSymbolImage", 4, 3, 0.7, 5.1875, 2.5, false); Step 3

} catch(ErrorMsg) Advice { xfa.host.messageBox(ErrorMsg.toString()); }

(6)

Contact

Visit our website for news and releases: http://barcodedPDFforms.com Mail us with technological questions:

[email protected]

With any other non-technological question, you can mail us at: [email protected]

References

Related documents

Lower yields of both bell pepper and french bean in the plots amended with organic manures and composts may have been associated with the less readily available nutri- ents in

Note: The Master Guide (located at the beginning of Volume I & II) and the Master Tips to Professionals (located at the back of Volume I) have many topics to assist in the

This offer is subject to the execution of all documentation b y the Lessee within a reasonable time and in form and substance acceptable to Le ss ee , USBGLF and USBGLF '

For the feature ranking and selection procedures, it is not surprising that CAD score is the most relevant fea- ture for the combined strategy, as it is a complete screening strategy

First, I build on previous evidence by Chevalier and Marie (2017) on the East German fertility decline, but in contrast to these authors, I exploit exogenous variation in women’s

Feature representation is an important issue for person re-identification, and features from an ideal person image should be sufficiently invariant against viewing changes

This tiny white or pink soil species is probably one of our more common woodlice but it is difficult to find and thus grossly under-recorded. It prefers slightly damp, friable soil

Why a dual approach: Testing/qualification for replacement + prepare for authorisation Need qualified replacements before reaching the sunset date Sep 2017. Baseline is