Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

Printer dll

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-20-2007, 12:34 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default Printer dll

Hi guys

Before the forum was hacked,again, I had a thread about wrapping the Printer.DLL wich seems to be a native(?) dll...

Not sure who, but someone replied ( thank you ) saying that I only needed to establish a serial conection between the device and the printer and send string to it...

But I was targeting the Desktop....From what I could read in several pages in Internet, Printer dll support returning the default printer, setting a default printer, print preview, etc....

I think that with a working printer support our apps could turn much more powerfull, and thus making Basic4Ppc much more visible....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #2 (permalink)  
Old 07-20-2007, 01:38 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

I've attached a small library named DesktopOnly.
As it name suggests it can only be used on the desktop.
Currently it only includes the Printer object which allows printing strings and text files.
In the future it will include more functionality and will be released with all other libraries.
The documentation is included in the zip file.

Last edited by Erel : 09-09-2007 at 07:56 AM. Reason: You can now download this library from the Downloads page.
Reply With Quote
  #3 (permalink)  
Old 07-20-2007, 02:08 PM
Knows the basics
 
Join Date: May 2007
Location: Czech Republic
Posts: 72
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Yupee .
Thank you very much Erel, you've made me happy this day.
Petr
Reply With Quote
  #4 (permalink)  
Old 07-20-2007, 02:10 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Erel, you are supperb....

I don't know if this lib was already in the making and it was just my good timing or if I started you going...anyway...

Thanks!!!! a LOT

Only You to release a new Lib the day it was "requested"!!!!
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #5 (permalink)  
Old 07-20-2007, 02:33 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Actually it was partially finished (some weeks ago).
But when I saw your request I've decided to finish the work and publish it.
As I wrote, this library will include much more functionality in the future.
Reply With Quote
  #6 (permalink)  
Old 07-20-2007, 03:00 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default


Thank you Erel.

CableGuy,

Actualy before the forum restore you've posted a request for a printer libraryl based on the artice of the following link http://www.codeproject.com/netcf/CFPrinterClass.asp which is for the compact framework.

My answer was the following.

It is easy to print ASCII characters to a serial, IR, or Bluetooth line (or even page) printer (as the class you mentioned above does) from your device.

You need only to open a serial connection to your printer using serial library (with the right BaudRate etc.) and then send strings followed by CRLF to change line. When you are finished with your page send a form feed character (ASCII character 12) to change page. Then close the serial connection.

Send escape sequences (look to your printer's technical guide) for bold, italics, condensed, emphasized etc. characters.
It is that simple.

But this method prints only ASCII character (0-127) and Extended ASCII (128-255).

If you need to print graphics, barcodes or unicode strings then you must do much more because it is printer depended.

You should go deep into your printer as there is not a printing engine (as there is for Desktop Windows) for Windows Mobile with printer drivers etc. or use a third party control.

I personally to print to thermal label printers, I use from www.fieldsoftware.com it's PrinterCE.NetCF SDK. It is a commercial product and supports only concrete printers.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #7 (permalink)  
Old 07-20-2007, 04:32 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Dzt, thanks for retrieving my previous post a sub-sequencial reply....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #8 (permalink)  
Old 12-19-2008, 12:57 AM
Senior Member
 
Join Date: Apr 2007
Location: Canari Islan
Posts: 102
Awards Showcase
Beta Tester 
Total Awards: 1
Default

hi dimitris.

I bought the Printerce and I'm not able to use the "Constructors" to register the applications by basis4ppc.

can you help me?

Thank you


--------------
me he comprado el Printerce y no soy capaz de utilizar el Constructor para registrar las aplicaciones.

me puedes ayudar?

Gracias

Last edited by manu : 12-19-2008 at 01:00 AM.
Reply With Quote
  #9 (permalink)  
Old 12-22-2008, 08:16 PM
Senior Member
 
Join Date: May 2007
Posts: 125
Default

Hi. That library needs to be wrapped to make it compatible. I am looking into such a library myself, but haven't baught it just yet so I haven't started any wrapper for it. HTH.
Reply With Quote
  #10 (permalink)  
Old 12-23-2008, 12:51 AM
Senior Member
 
Join Date: Apr 2007
Location: Canari Islan
Posts: 102
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I have already fixed the problem, as I can get a library with the registration procedure for which they need it.

It is very easy
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On


All times are GMT. The time now is 09:49 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0