Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List 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: 1,313
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #2 (permalink)  
Old 07-20-2007, 01:38 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
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
Junior Member
 
Join Date: May 2007
Posts: 46
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: 1,313
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #5 (permalink)  
Old 07-20-2007, 02:33 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
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: Greece
Posts: 353
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: 1,313
Default

Dzt, thanks for retrieving my previous post a sub-sequencial reply....
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
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 On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:54 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0