Unable to utilize the Printing API in Rho 4.1

// Expert user has replied.
R Ryan Collins 3 years 7 months ago
2 1 0

I have upgraded to Rho 4.1 in attempts to utilize the new Printing API.  I have had zero success.  I have attempted both the JS samples and a rough Ruby implementation to connect to my Bluetooth printer. 

I have added the "printing" extension to my build.yml.  I receive the following errors when attempting to call into the API...

JS implementation:
Error when calling "Rho.Printer.searchPrinters": TypeError: 'undefined' is not an object (evaluating 'Rho.Printer.searchPrinters')

Ruby implementation:
When attempting to call "Rho::Printer.searchPrinters": I receive "Error: uninitialized constant Rho::Printer".

This project was actually created using 2.2.0 and upgraded to 4.1 just recently.  Any advice would be appreciated.

Thanks!
Ryan

Please Register or Login to post a reply

1 Replies

R Robert Galvin

Hi Ryan, We only support Zebra printers right now. You have to add to extensions to the build.yml:

extensions: ["printing","printing_zebra"]

The error above indicates that the JS object is not found. So make sure you build with the 'clean' option checked. Take a look at this guide:
Rhomobile | Printing

CONTACT
Can’t find what you’re looking for?