In the case of external services, although it is very comfortable just call the service and retrieve an image, they can cease to exist, become very slow, or just internet access is not an option.For those reasons I decided to create a simple server that allows the generation of certain barcodes and QR (I've needed so far) locally. The project is posted on GitHub at: https://github.com/padiazg/barcode-as-a-service
Currently it can generate codes for EAN13, CODE39, CODE129, PDF417 and QR. The list can be extended to other types that supports the Rescode package in which this project is based.To put it to work we must follow these steps:
- Node.js must be installed (the last version is recommended)
- Download the project in any folder
- Open a console and go to the folder where you just downloaded the project
- Run npm install to download the required packages
- Run node barcode-service
Once the service is running, we can point a browser at port 3000 of the host for a brief example of using the service.Comments and any feedback would be appreciated.
Actualización:
V1.1 (09/mayo/2016)- Solved a problem with fonts, related to the scale of the output.
- Added paramater "scale", to specify a desired scale for the gnerated image.
- Added parameter "fmt", to choise the imege format.
- Implemented generation for "DataMatrix"
- The internal procedure is simplified.
Don't forget to update the requirements whit npm install after upgrading to the new version.
No hay comentarios.:
Publicar un comentario