Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 7
Registered: ‎04-01-2011
My Device: Not Specified
My Carrier: Not Specified
Accepted Solution

Printin from a BlackBerry java App

Hi,

I must develop an application that allows you to print a document(plain text or pdf) previously created by a web service. Is there any API(or samplecode) to handle the protocol between the bb and the printer?.

 

Samplecode would be nice Smiley Tongue

 

I already checked google, but all posts are from 08/09.

 

Thanks.

Developer
Posts: 723
Registered: ‎03-12-2009
My Device: Playbook

Re: Printin from a BlackBerry java App

Depends on the printer, most have a language or interface you can use. Check with printer provider.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printin from a BlackBerry java App

[ Edited ]

Welcome to the forums.

 

At one stage, Kodak talked about producing a WiFi connected printer that would enable printing directly from a BlackBerry.  I don't know what happened to this.

 

Aside from that the only printers that connect to BlackBerry will be Bluetooth printers.  There are number of companies that supply Bluetooth printers with drivers for BlackBerry devices, including Zebra. 

 

However these will all struggle to print a pdf directly from the BlackBerry.  The driver will enable you to create a printstream to send to the printer, but will not actually format the data for you. 

 

Typically people will have server solutions when printing these sort of documents, so that the formatting, which is an expensive process, is not done on the BlackBerry.  As far as I know, if you wanted to print a pdf directly from the BlackBerry, you would have to render this yourself into the printer stream, and then send the printer stream.  I don't think any of the printer drivers support this level of functionality. 

 

Alternatively you might like to look at the HP printers which will print from an email.

New Contributor
Posts: 7
Registered: ‎04-01-2011
My Device: Not Specified
My Carrier: Not Specified

Re: Printin from a BlackBerry java App

Thx for the quick reply.

 

What im developing is for fiscal printers that can use blutooth connections, those printers must be mobile(like the ones you use when paying with your debit/credit card). Not sure how this is done but i think its not someting that can't be made by try&error

 

I just mailed and then phoned Zebra to talk about their interface, and yes, they have made one exlusive for BB

 

One more think, if there is any samplecode or guidline i'll be very happy.

 

Thanks again.

 

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printin from a BlackBerry java App

I'm pretty sure you will find the Zebra API and samples enough to get going. 

 

I've tried a number of printers over the years and for small thermal roll printers, I have no problems with Zebra's range.

 

You will have to spend sometime playing with LabelVista to get the Bluetooth PIN number on the device.  When they come, they don't have a PIN and so the Blackberry will not pair with them.  At least the ones in the UK don't.. 

Contributor
Posts: 16
Registered: ‎01-18-2011
My Device: 9800
My Carrier: AT&T

Re: Printin from a BlackBerry java App

Hello Peter, I am looking for example Blackberry source code to print bluetooth mobile printer MZ320. The example source code from zebralink seems doesn't work. Would you like to explain how to make it work ?

 

I have  tried to compile the example source code (*.java files)  but when we run into the blackberry it says. "Error starting Zebra Module 'ZSDK_API' not found". I saw the cod file size (31Kbytes) is different from the original compiled one (57Kbytes).

 

When I tried  the existing sample ZSDK_Demos.cod, the  file can be installed into blackberry OS   5 and 6 but when we choose "ready to print" button, and click Connect button it says : printer status  is Unknown (this happen to other modules as well). The ZSDK_Demos.cod cannot print to zebra printer since the printer cannot be detected.

I have tested using zebrautilites.cod program to make sure no PIN bluetooth problem, no broken printer problem. When I use zebra utilites program, it can print and works properly.

 

What is the problem ?

 

Thank you.


 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printin from a BlackBerry java App

Sorry I have not looked at this for a while and won't have time in the immediate future.  Have you tried talking to Zebra?

 

I have had all their code running in OS 5.0 devices and have Zebra printers using my own code printing in OS 6.0. 

Highlighted
Contributor
Posts: 16
Registered: ‎01-18-2011
My Device: 9800
My Carrier: AT&T

Re: Printin from a BlackBerry java App

Thank you very much for your suggestion.

Let me talk to zebra first.

 

Regards,
Ferry