Created
January 20, 2020 03:22
-
-
Save ix4/aad3db2f5c8f0911a97909e20bbb0b86 to your computer and use it in GitHub Desktop.
pdf417-generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>PDF417 HUB3 2D barcode generator</title> | |
<style> | |
body,html { | |
height: 100%; | |
} | |
body { | |
display: flex; | |
justify-content: space-evenly; | |
align-items: center; | |
flex-wrap: wrap | |
} | |
</style> | |
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/libbcmath.js" type="text/javascript"></script> | |
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/bcmath.js" type="text/javascript"></script> | |
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/pdf417.js" type="text/javascript"></script> | |
<script> | |
window.onload = function() { | |
var code = "HRVHUB30\nHRK\n" + | |
"000000000012355\n"+ | |
"PETAR KORETIĆ\n"+ | |
"PREVOJ DD\n"+ | |
"10000 Zagreb\n"+ | |
"FIRMA J.D.O.O\n"+ | |
"PREVOJ DD\n"+ | |
"10000 ZAGREB\n"+ | |
"HR5041240000000000\n"+ | |
"HR01\n"+ | |
"7336-68949637625-00001\n"+ | |
"COST\n"+ | |
"Uplata za 1. mjesec\n"; | |
document.getElementById("code").value = code | |
generate() | |
} | |
function generate() { | |
var code = document.getElementById("code").value | |
var canvas = document.getElementById("barcode") | |
PDF417.draw(code, canvas) | |
} | |
</script> | |
</head> | |
<body> | |
<textarea id="code" cols="30" rows="15" oninput="generate()" onchange="generate"></textarea> | |
<canvas id="barcode" ></canvas> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment