PDF417

PDF417 is used in many applications by both commercial and government organizations. PDF417 bar code (also called a symbol) consists of 3 to 90 rows, each of which is like a small linear bar code.

Description
app.vue
index.html
Copy to CodeMine

You can create a PDF417 Code using the BC_PDF417 function in a formula: =BC_PDF417(value, color, backgroundColor, errorCorrectionLevel, rows, columns, compact, quietZoneLeft, quietZoneRight, quietZoneTop, quietZoneBottom)

The function has the following parameters:

value: the bar code value.

color: the bar code color.

backgroundColor: the bar code color background color.

errorCorrectionLevel: (default value is 'auto') this string represents the error correction level of PDF417, which can be 'auto' or 0-8..

rows: (default value is 'auto') this value specifies the number of rows in the symbol, which can be 'auto' or 3-90.

columns: (default value is 'auto') this value specifies the number of columns in the symbol, which can be 'auto' or 1-30.

compact: (default value is false) this value defines whether the code is compact.

You can create a PDF417 Code using the BC_PDF417 function in a formula: =BC_PDF417(value, color, backgroundColor, errorCorrectionLevel, rows, columns, compact, quietZoneLeft, quietZoneRight, quietZoneTop, quietZoneBottom) The function has the following parameters: value: the bar code value. color: the bar code color. backgroundColor: the bar code color background color. errorCorrectionLevel: (default value is 'auto') this string represents the error correction level of PDF417, which can be 'auto' or 0-8.. rows: (default value is 'auto') this value specifies the number of rows in the symbol, which can be 'auto' or 3-90. columns: (default value is 'auto') this value specifies the number of columns in the symbol, which can be 'auto' or 1-30. compact: (default value is false) this value defines whether the code is compact.
<template> <div class="sample-tutorial"> <gc-spread-sheets class="sample-spreadsheets" @workbook-initialized="initSpread"> <gc-worksheet :auto-generate-columns="autoGenerateColumns" /> <gc-worksheet :auto-generate-columns="autoGenerateColumns" /> </gc-spread-sheets> </div> </template> <script setup> import { ref } from 'vue'; import '@mescius/spread-sheets-vue'; import GC from '@mescius/spread-sheets'; import '@mescius/spread-sheets-barcode'; const autoGenerateColumns = ref(true); const spread = ref(null); const initSpread = (spreadInstance) => { spread.value = spreadInstance; spreadInstance.suspendPaint(); const sheet = spreadInstance.getSheet(0); const FORMULA = "BC_PDF417"; sheet.name("customSheet"); sheet.getCell(1, 1).value("Service"); sheet.getCell(1, 2).value("Number"); sheet.getCell(1, 3).value("PDF417 Code"); sheet.getCell(2, 3).value("Default"); sheet.getCell(2, 4).value("Customer Padding"); sheet.getCell(2, 5).value("Customer Columns Count"); const dataArray = [ ["Police", 911], ["Telephone Directory Assistance", 411], ["Non-emergency Municipal Services", 311], ["Travel Info Call 511", 511] ]; sheet.setArray(3, 1, dataArray); for (let row = 3; row < 7; row++) { sheet.setRowHeight(row, 80); } sheet.addSpan(1, 1, 2, 1); sheet.addSpan(1, 2, 2, 1); sheet.addSpan(1, 3, 1, 3); sheet.setColumnWidth(0, 20); sheet.setColumnWidth(1, 200); sheet.setColumnWidth(2, 80); sheet.setColumnWidth(3, 200); sheet.setColumnWidth(4, 200); sheet.setColumnWidth(5, 200); sheet .getRange(1, 1, 2, 5) .foreColor("#000") .backColor("#FFF3CE") .borderLeft( new GC.Spread.Sheets.LineBorder( "orange", GC.Spread.Sheets.LineStyle.thin ), { outline: true } ) .borderBottom( new GC.Spread.Sheets.LineBorder( "orange", GC.Spread.Sheets.LineStyle.thin ), { outline: true } ); sheet .getRange(1, 1, 6, 5) .vAlign(GC.Spread.Sheets.VerticalAlign.center) .hAlign(GC.Spread.Sheets.HorizontalAlign.center) .setBorder( new GC.Spread.Sheets.LineBorder( "orange", GC.Spread.Sheets.LineStyle.medium ), { outline: true } ); sheet.getRange(1, 1, 5, 1).wordWrap(true); for (let row = 3; row < 7; row++) { let value = "CONCAT(B" + (row + 1) + ', ": ",C' + (row + 1) + ")"; sheet.setFormula(row, 3, "=" + FORMULA + "(" + value + ")"); sheet.setFormula( row, 4, "=" + FORMULA + "(" + value + ", , , , , , , 0, 10, 5, 5)" ); sheet.setFormula(row, 5, "=" + FORMULA + "(" + value + ", , , , , 5)"); } spreadInstance.resumePaint(); }; </script> <style scoped> #app { height: 100%; } .sample-tutorial { position: relative; height: 100%; overflow: hidden; } .sample-spreadsheets { width: 100%; height: 100%; overflow: hidden; float: left; } .options-container legend { text-align: center; } .option-row { font-size: 14px; padding: 5px; } input { display: block; width: 100%; margin: 8px 0; box-sizing: border-box; } label, input { padding: 4px 6px; } body { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } #app { height: 100%; } #drawUnderline { display: inline-block; width: 30px; } #drawUnderlineLabel { display: inline-block; } #allowAutoCreateHyperlink { display: inline-block; width: 30px; } #setHyperlinkButton { font-weight: bold; background-color: #ecf3ff; width: 200px; height: 35px; border-radius: 4px; border-color: #0b93d5; border-width: thin; } #settingsDiv { margin-top: "10px" } #settingString { padding: "2px 10px } #allowAutoCreateHyperlinkDiv { margin-top: "10px" } </style>
<!DOCTYPE html> <html style="height:100%;font-size:14px;"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>SpreadJS VUE</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="$DEMOROOT$/en/vue3/node_modules/@mescius/spread-sheets/styles/gc.spread.sheets.excel2013white.css"> <script src="$DEMOROOT$/en/vue3/node_modules/systemjs/dist/system.src.js"></script> <script src="systemjs.config.js"></script> <script src="compiler.js" type="module"></script> <script> var System = SystemJS; System.import("./src/app.js"); System.import('$DEMOROOT$/en/lib/vue3/license.js'); </script> </head> <body> <div id="app"></div> </body> </html>
(function (global) { SystemJS.config({ transpiler: 'plugin-babel', babelOptions: { es2015: true }, paths: { // paths serve as alias 'npm:': 'node_modules/' }, packageConfigPaths: [ './node_modules/*/package.json', "./node_modules/@mescius/*/package.json", "./node_modules/@babel/*/package.json", "./node_modules/@vue/*/package.json" ], map: { 'vue': "npm:vue/dist/vue.esm-browser.js", 'tiny-emitter': 'npm:tiny-emitter/index.js', 'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js', "systemjs-babel-build": "npm:systemjs-plugin-babel/systemjs-babel-browser.js", '@mescius/spread-sheets': 'npm:@mescius/spread-sheets/index.js', '@mescius/spread-sheets-vue': 'npm:@mescius/spread-sheets-vue/index.js', '@mescius/spread-sheets-barcode': 'npm:@mescius/spread-sheets-barcode/index.js', }, meta: { '*.css': { loader: 'systemjs-plugin-css' }, '*.vue': { loader: "../plugin-vue/index.js" } } }); })(this);