Hi to all,
I purchased the sample fragment from here https://thelivecycle.blogspot.com/2016/03/dynamic-pdf417-code.html
The fragment is based on http://bkuzmic.github.io/pdf417-js/
After the form is populated, form will be verified and if the form is valid, barcode will be generated.
The barcode is used by the payer to just scan it and the payment data are decoded and placed inside mobile bank app without typing in all data.
The form looks following:
Beside the fragment there is an additional renderBarcodeFunction which converts string into barcode and places it on the form.
I need help with adjusting that function, to get the output which can be decoded by mobile bank application.
In addition, when I use demo site http://bkuzmic.github.io/pdf417-js/ for generating barcode from same data and scanning it - mobile app recognizes it successfully.
I think, that custom renderBarcodeFunction must be adjusted in some way.
Is there anybody who can help me with that?
Kind regards,
Ivica
Solved! Go to Solution.
Views
Replies
Total Likes
The bacode hasn't been designed to be editable in all that way. You can controll it's width, silence zone, aspect ratio of the moduls, the error correction level and color. Everything else is dynamically generated depending on the input data, which hast to be a string. Binary data isn't supported.
Try the following settings when calling the renderPDF417 function.
/** Begin to rendern PDF417 code
* @param sInput String: String to encode
* @param iECC Integer: Error correctio level -1 (default automatic), 0 (low) bis 8 (high)
* @param fRatio Float: Aspect ratio of the modules (pixel) (default 2.0)
* @param oPDF417 Objekt: XFA-Object, that represents the code
* @param fReserve Float: Whitespace around the code
* @param fSize Float: Width of the code
* @param sUnit String: Measurement for whitespace and width (mm, cm, in or pt)
* @param sColorDark String: RGB color of the dark pixels (default "0,0,0" = black)
**/
if (!this.isNull) {
XFAUtils.renderPDF417 (this.rawValue, 4, 3, this.resolveNode("Barcode"), .254, 58, "mm", "0,0,0");
}
The bacode hasn't been designed to be editable in all that way. You can controll it's width, silence zone, aspect ratio of the moduls, the error correction level and color. Everything else is dynamically generated depending on the input data, which hast to be a string. Binary data isn't supported.
Try the following settings when calling the renderPDF417 function.
/** Begin to rendern PDF417 code
* @param sInput String: String to encode
* @param iECC Integer: Error correctio level -1 (default automatic), 0 (low) bis 8 (high)
* @param fRatio Float: Aspect ratio of the modules (pixel) (default 2.0)
* @param oPDF417 Objekt: XFA-Object, that represents the code
* @param fReserve Float: Whitespace around the code
* @param fSize Float: Width of the code
* @param sUnit String: Measurement for whitespace and width (mm, cm, in or pt)
* @param sColorDark String: RGB color of the dark pixels (default "0,0,0" = black)
**/
if (!this.isNull) {
XFAUtils.renderPDF417 (this.rawValue, 4, 3, this.resolveNode("Barcode"), .254, 58, "mm", "0,0,0");
}
Views
Likes
Replies