PrintBase
  • Product
  • Pricing
  • Docs
  • Resources
PrintBase/Guides/Printing troubleshooting

Print to a USB printer from another network

A USB printer stays on its computer. That computer runs the agent. Other networks send a job. They never see the USB port.

For People who need a USB printer to serve a cloud app

Overview

USB has no IP address. A cloud server cannot open a USB port in another building. The computer that has the cable runs the agent, and the cloud server posts a job by printer_code. The USB device stays local.

Install the driver first. If the OS cannot print a test page, the agent cannot either. Then leave that computer on. Sleep looks like AGENT_OFFLINE.

Network printers are the same pattern once they are installed as a queue. You still do not put their private IP in the API request.

Create the job with POST /v1/print-jobs, an Authorization: Bearer header, printer_code, content_type pdf or raw, and exactly one of content or content_url. The free plan is 100 jobs a month on one computer.

Integration steps

  1. 01

    Print a test page on the USB host

    Driver first. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

  2. 02

    Run the agent on that host

    Not on the cloud server. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

  3. 03

    Address it by code

    GET /v1/printers. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

  4. 04

    Keep the host awake during service

    A laptop lid is a common outage. Use POST /v1/print-jobs with Authorization: Bearer and the printer_code from GET /v1/printers.

Node.js

// Job aimed at the USB printer's queue
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
    'Content-Type': 'application/json',
    'Idempotency-Key': idempotencyKey,
  },
  body: JSON.stringify({
    printer_code: Number(process.env.PRINTER_CODE),
    content_type: 'pdf',
    content: pdf.toString('base64'),
    copies: 1,
  }),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }

Details for this setup

No USB-over-IP claim

This product does not tunnel USB. It submits a print job to the OS queue. The agent prints only what you send; it does not fetch the document from the platform for you.

Several USB printers

Each queue has a code. One agent can report many. The agent prints only what you send; it does not fetch the document from the platform for you.

Questions

Can a phone be the USB host?

The agent is Windows, macOS, or Linux. A phone is not. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Raspberry Pi as the host?

It is a Linux computer. Install CUPS, the printer, and the Linux agent. There is no separate Pi appliance image described here.

Does the cloud see the USB vendor id?

It sees the queue the agent reports, including the name. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.

Unplugging the cable?

The OS marks the printer down. The job fails with a printer or print error, not a network timeout to USB.

Related guides

  • Print from AWS to a printer behind a firewall

    A server on AWS does not need a path to the printer's private IP. The office agent connects outbound and your server posts a job.

  • The print agent keeps going offline

    AGENT_OFFLINE means the computer's agent is not connected. Sleep, network, and a stopped process are the usual causes. The printer itself is a different code.

  • Print ESC/POS receipts on an Epson TM-T20III

    Send ESC/POS bytes to a TM-T20III as raw, or a PDF if you rely on the Epson driver. 80 mm paper, code page is your responsibility.

  • Print address labels on a DYMO LabelWriter 450

    Send a PDF sized to the DYMO die, such as a 30252 address label. The LabelWriter 450 does not speak ZPL. The agent uses the OS queue.

Free plan: 100 jobs a month on one computer, no card.

Create a free accountRead the API docs
PrintBase

PrintBase connects your applications to physical printers anywhere - securely, reliably, and in real time.

Product
Receipt PrintingLabel PrintingDashboardDevicesWebhooks
Resources
DocsBlogStatusAPI ReferenceDownloadPrintBase vs PrintNodePrintNode PricingFAQ
Guides
All guidesIntegrationsPrintersCode samplesComparisonsUse casesTroubleshooting
Company
ContactSecurityPrivacy

© 2026 Aveniq Technologies OÜ. All rights reserved. PrintBase is a service of Aveniq Technologies OÜ.

PrivacyTermsRefunds