Amazon AppStream 2.0 supports local printer redirection, enabling users to print documents, including barcodes, from their streaming applications to printers connected to their local computers. The below section explores some of the options we have explored for barcode printing for ZPL printers
- Direct ZPL Command Printing:
- When sending ZPL commands from a
local laptop using the Zebra JavaScript SDK, the printer successfully
receives and prints the output as intended.
- However, when attempting the same
from within the AppStream environment, we consistently encounter
connection refusals.
- AppStream instances run in a
cloud-based, isolated environment, which means that direct access to local
printers over HTTP (e.g., 127.0.0.1:9100) is not possible. This is why the
connection is successful locally but fails when attempted from AppStream.
- The Zebra SDK works well in a local
setting by communicating directly with printers over localhost. However,
in AppStream, "localhost" refers to the AppStream server itself,
not the client machine, leading to a connection refusal.
- Image and PDF Printing:
- Store barcodes as images or PDFs and
print from AppStream using Print Job Redirection and via local printing.
- Local Computer- Configure Printer
preferences, adjustments, label types etc and save these as default
preferences.
- In Appstream – Select the local default preferences and print – its prints Successfully.
- Select preferences and click print.
With this process, from AppStream, barcode can be printed using barcode
settings done in local computer.
Possible Solutions Moving Forward
- Option 1 -Print Job Redirection:
Leveraging Print Job Redirection for generic print jobs like PDFs or
images and print the barcode images/pdfs from Appstream( as above)
- Option 2 -Save barcode images/pdf
to a local path mapped to AppStream, allowing users to select and print
them manually.
- Option 3 - Save barcode images/pdf
to a local path mapped to AppStream. Develop a listener application on the
local machine that monitors a specific folder for new barcode files and
automatically prints them.
- Option 4 - Utilize a backend service to handle printing tasks (refer earlier post) which communicates with network printers to execute print jobs using ZPL commands.
No comments:
Post a Comment