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
jombcellcent
Posts: 6
Registered: ‎03-18-2013
My Device: BOLD 9000

(Help) How to Set Font Size in Bluetooth Print "Blue Bamboo"

[ Edited ]

Hi, How to set font size in Bluetooth Print "Blue Bamboo". this code for execute print :

 

btn_test.setChangeListener(new FieldChangeListener() {
public void fieldChanged(Field field, int context) {
try{
String text = DeviceInfo.getDeviceName();
String text2 = DeviceInfo.getManufacturerName();
String text3 = DeviceInfo.getPlatformVersion();
String text4 = DeviceInfo.getSoftwareVersion();
String Hasil = "Device:Blackberry "+text+"\n"+
                          "Manufacturer:"+text2+"\n"+
                          "Ver. Platform:"+text3+"\n"+
                          "Ver. Software:"+text4+"\n";

                          _dout.write(Hasil.getBytes());
                          _dout.flush();
                          _dout.close();
}catch (Exception e) {
// TODO: handle exception
Dialog.alert("Gagal Melakukan Test Print");
}
}
});
}

 

 

thanks for help 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: (Help) How to Set Font Size in Bluetooth Print "Blue Bamboo"

you will have to ask the printer manufacturer if this is supported by his driver.

note that you should execute blocking operations, like bluetooth i/o, in a separate thread. see http://supportforums.blackberry.com/t5/Java-Development/What-is-the-Event-Thread/ta-p/446865
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
jombcellcent
Posts: 6
Registered: ‎03-18-2013
My Device: BOLD 9000

Re: (Help) How to Set Font Size in Bluetooth Print "Blue Bamboo"

[ Edited ]

i not need driver from vendor, this code is work, and this set font size i dont know for this code. i need help for implemented code set font size to my code. 

 

thanks for help

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: (Help) How to Set Font Size in Bluetooth Print "Blue Bamboo"

there is no font size to set on a bluetooth connection.
you either have a special parameter that the printer driver accepts or you cannot change the font size.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: (Help) How to Set Font Size in Bluetooth Print "Blue Bamboo"

My experience is that all printers have some sort of control 'language' that they accept.  Postscript is the most obvious one, and to use a PostScript printer via Bluetooth you have to package the data into a postscript package.  Other printers do print when sent text directly, and my experience is that these will have some sort of escape mechanism where you can send printer commands to the printer.  Epsom ESC/P is an example.  As Simon has said, this will be determined by the printer manufacturer, not Bluetooth.  So you really do have to ask the printer manufacturer how to do this and you will have to send special characters to the printer to request the font you want.  Look for a low level communication protocol specification document for the printer you are trying to use.