[WinPrnDev] Re: Creating a Printer Driver

  • From: Sam Elamin <hussam_88@xxxxxxxxxxx>
  • To: <winprndev@xxxxxxxxxxxxx>
  • Date: Wed, 31 Mar 2010 09:44:48 +0000

Jason/Gary
Thanks Jason I got the sample working, now I am trying to understand what a 
port monitor is and how to implement it into the sample driver
Gary thank you for your detailed email and I understand your concerns. 
But what i dont get is the print driver that will sit on the client side, if it 
converts documents to XPS then the print driver compatibility is not really an 
issue because XPS can be understood by most printers right?
and if its not why not use an XPS to PDF converter then print it at the server. 
The question is when you print it how do you know what properties to give it ( 
Color, Mono, Duplex, Simplex, etc) I am assuming there will be no printing done 
at the client side so no spool file is generated.

But if we go down the EMF route, then printing will be done, a spool file will 
be generated and then the EMF will be extracted from that spool file.
The EMF then has to be transfered to a print server where it will be played 
back into a spool file so it can be printed.
Does that seem right? 
RegardsSam
From: jharrison@xxxxxxxxxxx
To: winprndev@xxxxxxxxxxxxx
Subject: [WinPrnDev] Re: Creating a Printer Driver
Date: Tue, 30 Mar 2010 09:44:50 -0700



















Hey Sam,

 

With the WDK 7600 there is an XPS printer sample, and much older
port monitor sample.  The harder part is connecting them and installing
them.  But all of the code is there and I believe working.

 

-Jason

 



--

Jason Harrison

Sr Software Developer

PDFTron Systems, Inc.

www.pdftron.com

Tel:  1-604-730-8989

Fax: 1-604-676-2477

Email: jharrison@xxxxxxxxxxx











CONFIDENTIALITY NOTICE: This message (and any attachment to it)
is intended only for the use of the individual or entity to which it is
addressed in the header, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. Any reproduction,
distribution, modification or use of the contents of this message (and any 
attachment
to it) by any individual or entity other than the intended recipient is
prohibited. If you have received this communication in error, please notify us
immediately and delete the original.











P Please think before you print!



 





From:
winprndev-bounce@xxxxxxxxxxxxx [mailto:winprndev-bounce@xxxxxxxxxxxxx] On
Behalf Of Sam Elamin

Sent: Tuesday, March 30, 2010 4:55 AM

To: winprndev@xxxxxxxxxxxxx

Subject: [WinPrnDev] Re: Creating a Printer Driver





 

Hey
Clinton



 





Sorry
for the late reply but Iw as rebuilding my PC with Windows 7 because I heard
that it is better as a printer driver building enviroment. 





 





I
have read your email and have a few questions:





 





1)
Did you use WDK to develop your driver? Did you write your driver yourself?





 





2)
How do I start devloping this PostScript parser? and since its Postscript does
it mean that I wont be ableto print to PCL drivers? Or willconverting it to PDF
do the trick?





 





3)
I have no idea what you mean by using Port monitors, is there any reference I
can go back to and learn from?





 





4)
I think for testing purposes we might have to assume no errors and get the
actual driver working before installing checks to look for errors





 





I
just feel really lost and overwhelmed, where is the best place to start?





 





Regards





Sam





 







From: clinton@xxxxxxxxxxxxxx

To: winprndev@xxxxxxxxxxxxx

Subject: [WinPrnDev] Re: Creating a Printer Driver

Date: Sun, 28 Mar 2010 10:32:58 +0100



Hi Sam,





I'm doing this off the
tail end of what seems like a long discussion.





Not sure if you have your
answer yet but might have a few design ideas for you.





What you are trying to
achieve has been done before and is possible.





Back in 2002 I was faced
with a similar issue. Getting a document off the client PC and sending it round
the world to an unknown print server.





The solution is a
combination of technologies that each do their own part..





 





1.) I used a PostScript print
driver ( Generic PPD will do the job ) that pass the print stream onto a
portmonitor ( this gives you the control to assign to random filename and pass
onto the next module either WebService or in my case a socket service
client ). 





 





THINGS TO REMEMBER:





If you are to allow for
duplex, orientation, colour etc, then you will need to gather this info and
"drag" it along. I developed a PostScript parser that drives through
the spool file ( PostScript ) extracts these bits and then passes this with the
file along ( make use of network sockets and send as parameters or HASH index -
a WenService or Socket listener would need to manage these parameters ).
OR in the world of WebServices pass over an XML stream that can be managed.





 





On the "Server"
side either convert to a generic format i.e. PDF which then can be converted
over to MOST printer specific languages





 





2.) Develop a portmonitor
that manages the spoolfile and controls calling the "service client"
either webservice or sockets. Remember to remove the file and close portinfo
thus removing the JOB off the print queue.





 





3.) The bigest problem
with transmitting data around is that we forget about the wonderful worl of
TCP/IP packets and ERROR checking. What happens if network goes down during
transmission, do I restart, fail, notify user or cycle through a number of
socket trying to establish connection.





 





Hope this helps for
starters.





Clinton Bessesen





check out www.pdqit.com





 





 





 





 







Do
you want a Hotmail account? Sign-up
now - Free

                                          
_________________________________________________________________
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/

Other related posts: