Hi! This cordova plugin converts images to ZPL-Code. To use this plugin you need the permission READ_EXTERNAL_STORAGE. This plugin is Android only.
npm install cordova-plugin-zpl-image-converter
cordova plugin add cordova-plugin-zpl-image-converter
(window as any).plugins.zplImageConverter.convertImage(filePath: string, width: number, height: number, angle: number, zplCode => {
// Your code
}, err => {
// Your error-handling
});
angle describes the rotation of the image
If you set the height and width parameters to 0, no scaling will be performed.
Based on: http://www.jcgonzalez.com/java-image-to-zpl-example Git-Repo: https://github.com/rafgenduke/cordova-plugin-zpl-image-converter