pdf417-generator
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -11,3 +11,3 @@ { | ||
"type": "git", | ||
"url": "git+https://github.com/qaap/pdf417-generator.git" | ||
"url": "git+https://github.com/pkoretic/pdf417-generator.git" | ||
}, | ||
@@ -23,8 +23,9 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/qaap/pdf417-generator/issues" | ||
"url": "https://github.com/pkoretic/pdf417-generator/issues" | ||
}, | ||
"homepage": "https://github.com/qaap/pdf417-generator#readme", | ||
"homepage": "https://github.com/pkoretic/pdf417-generator#readme", | ||
"dependencies": { | ||
"canvas": "^1.6.10" | ||
"canvas": "^1.6.10", | ||
"pdf417-generator": "^1.0.0" | ||
} | ||
} |
@@ -1,17 +0,19 @@ | ||
const Canvas = require('canvas') | ||
const PDF417 = require("../../lib/pdf417") | ||
const Canvas = require("canvas") | ||
const PDF417 = require("pdf417-generator") | ||
const code = "HRVHUB30\nHRK\n" + | ||
"000000000012355\n"+ | ||
"PETAR KORETIĆ\n"+ | ||
"PREVOJ DD\n"+ | ||
"10000 Zagreb\n"+ | ||
"QAAP 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"; | ||
const code = | ||
`HRVHUB30 | ||
HRK | ||
000000000012355 | ||
PETAR KORETIĆ | ||
PREVOJ DD | ||
10000 Zagreb | ||
QAAP J.D.O.O | ||
PREVOJ DD | ||
10000 ZAGREB | ||
HR5041240000000000 | ||
HR01 | ||
7336-68949637625-00001 | ||
COST | ||
Uplata za 1. mjesec` | ||
@@ -22,2 +24,2 @@ let canvas = new Canvas() | ||
// create image which can be sent in an e-mail or similar | ||
console.log('<img src="' + canvas.toDataURL() + '" />') | ||
console.log(`<img src="${canvas.toDataURL()}" />`) |
@@ -597,5 +597,10 @@ if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') | ||
var barcode = this.barcode_array | ||
canvas.width = barcode['num_cols'] | ||
canvas.height = barcode['num_rows'] | ||
// A canvas can appear too blurry on retina screens. | ||
// Use window.devicePixelRatio to determine how much | ||
// extra pixel density should be added to allow for a sharper image. | ||
var retinaMultiplier = window ? window.devicePixelRatio || 1 : 1 | ||
canvas.width = barcode['num_cols'] * retinaMultiplier | ||
canvas.height = barcode['num_rows'] * retinaMultiplier | ||
var ctx = canvas.getContext('2d') | ||
ctx.scale(retinaMultiplier,retinaMultiplier) | ||
@@ -602,0 +607,0 @@ // graph barcode elements |
{ | ||
"name": "pdf417-generator", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "PDF417 HUB3 2D barcode generator for browser and Node", | ||
@@ -15,3 +15,3 @@ "main": "lib/pdf417.js", | ||
"type": "git", | ||
"url": "git+https://github.com/qaap/pdf417-generator.git" | ||
"url": "git+https://github.com/pkoretic/pdf417-generator.git" | ||
}, | ||
@@ -27,5 +27,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/qaap/pdf417-generator/issues" | ||
"url": "https://github.com/pkoretic/pdf417-generator/issues" | ||
}, | ||
"homepage": "https://github.com/qaap/pdf417-generator#readme" | ||
"homepage": "https://github.com/pkoretic/pdf417-generator#readme" | ||
} |
@@ -10,3 +10,3 @@ ## PDF417 HUB3 Barcode Generator | ||
You can find a complete example at [examples/browser](examples/browser). | ||
You can find a complete example at [examples/browser](examples/browser) and a running demo [here](https://pkoretic.github.io/pdf417-generator). | ||
@@ -16,5 +16,5 @@ The usage is as simple as providing a canvas element and a text that should be used for barcode generation: | ||
``` | ||
<script src="https://cdn.rawgit.com/qaap/pdf417-generator/master/lib/libbcmath.js" type="text/javascript"></script> | ||
<script src="https://cdn.rawgit.com/qaap/pdf417-generator/master/lib/bcmath.js" type="text/javascript"></script> | ||
<script src="https://cdn.rawgit.com/qaap/pdf417-generator/master/lib/pdf417.js" type="text/javascript"></script> | ||
<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> | ||
``` | ||
@@ -34,3 +34,3 @@ | ||
"10000 Zagreb\n"+ | ||
"QAAP J.D.O.O\n"+ | ||
"pkoretic J.D.O.O\n"+ | ||
"PREVOJ DD\n"+ | ||
@@ -53,2 +53,4 @@ "10000 ZAGREB\n"+ | ||
The [node-canvas](https://github.com/Automattic/node-canvas) library is used for drawing. | ||
Install the library: | ||
@@ -66,15 +68,17 @@ | ||
const code = "HRVHUB30\nHRK\n" + | ||
"000000000012355\n"+ | ||
"PETAR KORETIĆ\n"+ | ||
"PREVOJ DD\n"+ | ||
"10000 Zagreb\n"+ | ||
"QAAP 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"; | ||
const code = | ||
`HRVHUB30 | ||
HRK | ||
000000000012355 | ||
PETAR KORETIĆ | ||
PREVOJ DD | ||
10000 Zagreb | ||
FIRMA J.D.O.O | ||
PREVOJ DD | ||
10000 ZAGREB | ||
HR5041240000000000 | ||
HR01 | ||
7336-68949637625-00001 | ||
COST | ||
Uplata za 1. mjesec` | ||
@@ -85,7 +89,3 @@ let canvas = new Canvas() | ||
// create an image which can be sent in an e-mail or similar | ||
console.log('<img src="' + canvas.toDataURL() + '" />') | ||
console.log(`<img src="${canvas.toDataURL()}" />`) | ||
``` | ||
### Support | ||
You can always open a new issue or [contact us](https://qaap.io) and we’ll help you sort it out. |
Sorry, the diff of this file is not supported yet
Native code
Supply chain riskContains native code which could be a vector to obscure malicious code, and generally decrease the likelihood of reproducible or reliable installs.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
0
99368
11
1978