HTML to ZPL

FREEMIUM
By DAB Labs Inc | Updated 17 days ago | Video, Images
Popularity

9.6 / 10

Latency

2,396ms

Service Level

100%

Health Check

N/A

Back to All Discussions

Postman Connection

Hi, I am trying to establish a connection via Postman to test the API. I am using the ‘form-data’ body, with width, height and pdfBase64 as keys. In the headers I used the Rapidapi key and host. I am getting a result, but this result is a generic output from RapidAPI, and definitely not the ZPL output. Below a start of the response, which is actually 2130 rows. Could you let me know what is going wrong?

<!DOCTYPE html>
<html lang=“en-US”>
<head>
<meta charset=“UTF-8”>
<link rel=“profile” href=“https://gmpg.org/xfn/11”>
<meta name=‘robots’ content=‘index, follow, max-image-preview:large, max-snippet: -1, max-video-preview: -1’ />

<title>RapidAPI - The Next Generation API Platform</title>
<meta name=“description” content=“Use RapidAPI to Find, Connect, & Share 1000s of APIs using our Multi-cloud platform. Improve Developer Experience with API Design, Testing, Monitoring, & More!” />
<link rel=“canonical” href=“https://rapidapi.com/” />
<meta property=“og:locale” content=“en_US” />
<meta property=“og:type” content=“website” />
<meta property=“og:title” content=“RapidAPI - The Next Generation API Platform” />
<meta property=“og:description” content=“Use RapidAPI to Find, Connect, & Share 1000s of APIs using our Multi-cloud platform. Improve Developer Experience with API Design, Testing, Monitoring, & More!” />
<meta property=“og:url” content=“https://rapidapi.com/” />
<meta property=“og:site_name” content=“RapidAPI” />
<meta property=“article:publisher” content=“https://www.facebook.com/Rapid-API-860822767286196” />
<meta property=“article:modified_time” content=“2022-09-15T14:04:40+00:00” />
<meta property=“og:image” content=“https://rapidapi.com/wp-content/uploads/2021/02/marketplace.jpg” />
<meta property=“og:image:width” content=“1665” />
<meta property=“og:image:height” content=“1203” />
<meta name=“twitter:card” content=“summary_large_image” />
<meta name=“twitter:image” content=“https://rapidapi.com/wp-content/uploads/2021/02/marketplace.jpg” />
<meta name=“twitter:site” content="@Rapid_API" />
<meta name=“twitter:label1” content=“Est. reading time” />
<meta name=“twitter:data1” content=“5 minutes” />
<script type=“application/ld+json” class=“yoast-schema-graph”>{

Rapid account: Dablabs
dablabs Commented 2 years ago

Hi @integrationsopposuits,
That’s a great feature request. I think we’ll be able to add support for rotating PDFs quickly.
I’m hoping to have something for you to try by beginning of next week!

Rapid account: Integrationsopposuits
integrationsopposuits Commented 2 years ago

Hi @dablabs, thank you for the information! It works now! I have just printed our label, however we see that we need the label command to print the label 90 degrees rotated. I have tried to update the settings of the Zebra printer, but it seems that the ZPL command overwrites this setting. Do you perhaps know if its possible to change the rotation of the supplied ZPL command? Thank you!

Rapid account: Dablabs
dablabs Commented 2 years ago

I was able to get it working in Postman by using “application/json” as Content-Type and then posting the parameters in the body as json.

Here are two screenshots of the settings I used:

Postman Headers

Postman Body

Rapid account: Dablabs
dablabs Commented 2 years ago

@integrationsopposuits Perhaps the Content-Type header is set incorrectly?

I’ll see if I can make an example in Postman and will post it here shortly.

Rapid account: Integrationsopposuits
integrationsopposuits Commented 2 years ago

@dablabs Thank you for your reply! I used this and it seems like the request is working, however I receive the following response:

Invalid request, “html or pdfBase64” parameter not present in request.

I use in the body the setting “form-data”, including the parameter “pdfBase64” with the base64 string. Should be all set right? I also tried to use the sampe .base64 file from the documentation, but this resulted in the same error message.

Rapid account: Dablabs
dablabs Commented 2 years ago

Hi @integrationsopposuits,

This looks like the endpoint in Postman is set incorrectly.
Could you please verify that the endpoint is set to:
https://html-to-zpl.p.rapidapi.com/pdf2zpl

Let me know if this helps!

Join in the discussion - add comment below:

Login / Signup to post new comments