API URL:
Method:POST
https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/print/<<Api KEY>>
Parameters:
'Content-Type': 'application/json' { "url_image" : "https://exemple.com/file.png/jpg/...", "width" : 750 or null, "height" : 1100 or null, "horizontalSpace" : 30, "verticalSpace" : 50, "ip" : "Adresa IP", "port" : or PORT }
Code snippet:
let header = new Headers(); header.append("Content-Type", "application/json");
let data = JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg....", "width": 750, "height": 1100, "horizontalSpace": 30, "verticalSpace": 50, "ip": "127.0.0.1", "port": 5000 });
let options = { method: 'POST', headers: header, body: data, redirect: 'follow' };
fetch("https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/print/<<APY KEY>>", options) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg...", "width": 800, "height": 1100, "horizontalSpace": 30, "verticalSpace": 50, "ip": "127.0.0.1", "port": 5000 });
let config = { method: 'post', url:"https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/print/<<APY KEY>>", headers: { 'Content-Type': 'application/json' }, data : data };
axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); })
.catch(function (error) { console.log(error); });
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/print/<<APY KEY>>', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "url_image":"https://exemple.com/file.png/jpg....", "width":800, "height":1100, "horizontalSpace":30, "verticalSpace":50, "ip":"127.0.0.1", "port":5000 }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), ));
$response = curl_exec($curl); if (curl_errno($curl)) { print "Error: " . curl_error($curl); } echo '<pre>'; print_r($response); echo '<pre>'; curl_close($curl);
let settings = { "url": "https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/print/<<APY KEY>>", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" },
"data": JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg.....", "width": 750, "height": 1100, "horizontalSpace": 50, "verticalSpace": 30, "ip": "127.0.0.1", "port": 5000 }), }
$.ajax(settings).done(function (response) { console.log(response); });
Response:
The final answer that appears when or executed all functions without the problem.
{ "status":"success", "message":"Itelligent Image-ZPL Convertor", "ip":"IP Adress", "port":"Port", "zpl":"ZPL CODE", "response":{{printer response}} }
Occurs when the site's URL is invalid or does not contain that file.
{ "status":"failed", "message":"url invalid" }
Appears when the specified api key is not identified in the database.
{ "status":"failed", "message":"Invalid Api Key" }
It can be caused by incorrect image saving.
{ "status":'failed', "message":'failed to extract data from image', "code":'ERR_INVALID_PROTOCOL' }
It may be caused by an error in the conversion:
{ "status":'failed', "message":'failed to convert image to zpl', "code":((error)) }
Poate fi cauzata de o eroare in conversie sau adresa ip nu este una valida:
{ "status":"failed", "ip":"IP Adress", "port":"Port", "zpl":"ZPL CODE", "error":{{error from print}} }
API URL:
Method:POST
https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/<<Api KEY>>
Parameters:
'Content-Type': 'application/json' { "url_image" : "https://exemple.com/file.png/jpg/...", "width" : 750 or null, "height" : 1100 or null, "horizontalSpace" : 30, "verticalSpace" : 50 }
Code snippet:
let header = new Headers(); header.append("Content-Type", "application/json");
let data = JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg....", "width": 750, "height": 1100, "horizontalSpace": 30, "verticalSpace": 50 });
let options = { method: 'POST', headers: header, body: data, redirect: 'follow' };
fetch("https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/<<APY KEY>>", options) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg...", "width": 800, "height": 1100, "horizontalSpace": 30, "verticalSpace": 50 });
let config = { method: 'post', url:"https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/<<APY KEY>>", headers: { 'Content-Type': 'application/json' }, data : data };
axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); })
.catch(function (error) { console.log(error); });
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/<<APY KEY>>', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "url_image":"https://exemple.com/file.png/jpg....", "width":800, "height":1100, "horizontalSpace":30, "verticalSpace":50 }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), ));
$response = curl_exec($curl); if (curl_errno($curl)) { print "Error: " . curl_error($curl); } echo '<pre>'; print_r($response); echo '<pre>'; curl_close($curl);
let settings = { "url": "https://image-zpl.denda.ro/api/v1/image-to-zpl/convert/<<APY KEY>>", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" },
"data": JSON.stringify({ "url_image": "https://exemple.com/file.png/jpg.....", "width": 750, "height": 1100, "horizontalSpace": 50, "verticalSpace": 30 }), }
$.ajax(settings).done(function (response) { console.log(response); });
Response:
The final answer that appears when or executed all functions without the problem.
{ "status":"success", "message":"Itelligent Image-ZPL Convertor", "zpl":"ZPL CODE" }
Occurs when the site's URL is invalid or does not contain that file.
{ "status":"failed", "message":"url invalid" }
Appears when the specified api key is not identified in the database.
{ "status":"failed", "message":"Invalid Api Key" }
It can be caused by incorrect image saving.
{ "status":'failed', "message":'failed to extract data from image', "code":'ERR_INVALID_PROTOCOL' }
It may be caused by an error in the conversion:
{ "status":'failed', "message":'failed to convert image to zpl', "code":((error)) }
API URL:
Method:POST
https://image-zpl.denda.ro/api/v1/image-to-zpl/print/<<Api KEY>>
Parameters:
'Content-Type': 'application/json' { "ip" : "127.0.0.1", "port" : 5000, "zpl" : "^XA^FDHello World^XZ~PS" }
Code snippet:
let header = new Headers(); header.append("Content-Type", "application/json");
let data = JSON.stringify({ "ip": "127.0.0.1", "port": 5000, "zpl": "^XA^FDHello World^XZ~PS" });
let options = { method: 'POST', headers: header, body: data, redirect: 'follow' };
fetch("https://image-zpl.denda.ro/api/v1/image-to-zpl/print/<<APY KEY>>", options) .then(response => response.json()) .then(result => console.log(result)) .catch(error => console.log('error', error));
const axios = require('axios');
let data = JSON.stringify({ "ip": "127.0.0.1", "port": 5000, "zpl": "^XA^FDHello World^XZ~PS" });
let config = { method: 'post', url:"https://image-zpl.denda.ro/api/v1/image-to-zpl/print/<<APY KEY>>", headers: { 'Content-Type': 'application/json' }, data : data };
axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); })
.catch(function (error) { console.log(error); });
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://image-zpl.denda.ro/api/v1/image-to-zpl/print/<<APY KEY>>', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS =>'{ "ip":"127.0.0.1", "port":5000, "zpl":"^XA^FDHello World^XZ~PS" }', CURLOPT_HTTPHEADER => array( 'Content-Type: application/json' ), ));
$response = curl_exec($curl); if (curl_errno($curl)) { print "Error: " . curl_error($curl); } echo '<pre>'; print_r($response); echo '<pre>'; curl_close($curl);
let settings = { "url": "https://image-zpl.denda.ro/api/v1/image-to-zpl/print/<<APY KEY>>", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" },
"data": JSON.stringify({ "ip": "127.0.0.1", "port": 5000, "zpl": "^XA^FDHello World^XZ~PS" }), }
$.ajax(settings).done(function (response) { console.log(response); });
Response:
The final answer that appears when or executed all functions without the problem.
{ "status":"success", "message":"Itelligent PDF-ZPL Convertor - successful printing.", "ip":"127.0.0.1", "port":5000, "zpl":"ZPL CODE" }
It appears when there are problems in the function execution process.
{ "status":"failed", "error":{print error}, "ip":"127.0.0.1", "port":5000 }